Stop composite timer when Workspace gets destroyed

On Wayland tear down the Workspace gets destroyed before the Compositor
gets destroyed. If the timer fires in that area, the Compositor would
crash. It's not possible to start the timer if the Workspace is
destroyed, thus it should also be stoped on Workspace destroy.

Reviewed-By: Bhushan Shah
icc-effect-5.14.5
Martin Gräßlin 2016-06-29 08:34:10 +02:00
parent 736d99fc6a
commit 3c6dff75d5
1 changed files with 1 additions and 0 deletions

View File

@ -296,6 +296,7 @@ void Compositor::startupWithWorkspace()
return;
}
Q_ASSERT(m_scene);
connect(workspace(), &Workspace::destroyed, this, [this] { compositeTimer.stop(); });
claimCompositorSelection();
m_xrrRefreshRate = KWin::currentRefreshRate();
fpsInterval = options->maxFpsInterval();