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:
parent
7b9c21d63c
commit
936c52e263
1 changed files with 4 additions and 2 deletions
|
@ -769,12 +769,14 @@ void* EffectsHandlerImpl::getProxy(QString name)
|
||||||
|
|
||||||
void EffectsHandlerImpl::startMousePolling()
|
void EffectsHandlerImpl::startMousePolling()
|
||||||
{
|
{
|
||||||
Cursor::self()->startMousePolling();
|
if (Cursor::self())
|
||||||
|
Cursor::self()->startMousePolling();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectsHandlerImpl::stopMousePolling()
|
void EffectsHandlerImpl::stopMousePolling()
|
||||||
{
|
{
|
||||||
Cursor::self()->stopMousePolling();
|
if (Cursor::self())
|
||||||
|
Cursor::self()->stopMousePolling();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EffectsHandlerImpl::hasKeyboardGrab() const
|
bool EffectsHandlerImpl::hasKeyboardGrab() const
|
||||||
|
|
Loading…
Reference in a new issue