diff --git a/src/wayland/output_interface.cpp b/src/wayland/output_interface.cpp index 62b5fdec56..6bbb3c35d2 100644 --- a/src/wayland/output_interface.cpp +++ b/src/wayland/output_interface.cpp @@ -274,6 +274,11 @@ void OutputInterface::remove() return; } + d->doneTimer.stop(); + if (d->handle) { + disconnect(d->handle, nullptr, this, nullptr); + } + if (d->display) { DisplayPrivate *displayPrivate = DisplayPrivate::get(d->display); displayPrivate->outputs.removeOne(this); @@ -298,12 +303,16 @@ QVector OutputInterface::clientResources(ClientConnection *client void OutputInterface::scheduleDone() { - d->doneTimer.start(); + if (!d->isGlobalRemoved()) { + d->doneTimer.start(); + } } void OutputInterface::done(wl_client *client) { - d->sendDone(d->resourceMap().value(client)); + if (!d->isGlobalRemoved()) { + d->sendDone(d->resourceMap().value(client)); + } } OutputInterface *OutputInterface::get(wl_resource *native)