Check whether Cursor is valid before using from EffectsHandler mousePolling

During tear down Compositor and Effect system might be destroyed after
Cursor. Thus we need to ensure that we don't call into Cursor
unconditonally.
This commit is contained in:
Martin Gräßlin 2015-11-09 16:24:13 +01:00
parent 7b9c21d63c
commit 936c52e263

View file

@ -769,12 +769,14 @@ void* EffectsHandlerImpl::getProxy(QString name)
void EffectsHandlerImpl::startMousePolling()
{
Cursor::self()->startMousePolling();
if (Cursor::self())
Cursor::self()->startMousePolling();
}
void EffectsHandlerImpl::stopMousePolling()
{
Cursor::self()->stopMousePolling();
if (Cursor::self())
Cursor::self()->stopMousePolling();
}
bool EffectsHandlerImpl::hasKeyboardGrab() const