wayland/outputinterface: fix crash

The current mode may be nullptr
This commit is contained in:
Xaver Hugl 2022-05-18 11:13:22 +02:00 committed by Vlad Zahorodnii
parent be717d5c67
commit d03e352dbf

View file

@ -212,7 +212,7 @@ QSharedPointer<KWin::OutputMode> OutputInterface::mode() const
void OutputInterface::setMode(const QSharedPointer<KWin::OutputMode> &mode)
{
if (d->mode->size() == mode->size() && d->mode->refreshRate() == mode->refreshRate()) {
if (d->mode == mode) {
return;
}