catch nullptr effects when deleting shadows

the shadow can be deleted deferred from an update
there's a slight chance, to be eg. triggered by clients
blocking compositing, that the compositor is suspended in the same
cycle and the effects pointer (and scene and context) thus gone

CCBUG: 356938
FIXED-IN: 5.6
REVIEW: 126441
This commit is contained in:
Thomas Lübking 2015-12-21 00:18:00 +01:00
parent 070b85bbcf
commit cae90bb035

View file

@ -2195,9 +2195,11 @@ SceneOpenGLShadow::SceneOpenGLShadow(Toplevel *toplevel)
SceneOpenGLShadow::~SceneOpenGLShadow()
{
effects->makeOpenGLContextCurrent();
DecorationShadowTextureCache::instance().unregister(this);
m_texture.reset();
if (effects) {
effects->makeOpenGLContextCurrent();
DecorationShadowTextureCache::instance().unregister(this);
m_texture.reset();
}
}
void SceneOpenGLShadow::buildQuads()