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:
parent
070b85bbcf
commit
cae90bb035
1 changed files with 5 additions and 3 deletions
|
@ -2195,9 +2195,11 @@ SceneOpenGLShadow::SceneOpenGLShadow(Toplevel *toplevel)
|
||||||
|
|
||||||
SceneOpenGLShadow::~SceneOpenGLShadow()
|
SceneOpenGLShadow::~SceneOpenGLShadow()
|
||||||
{
|
{
|
||||||
effects->makeOpenGLContextCurrent();
|
if (effects) {
|
||||||
DecorationShadowTextureCache::instance().unregister(this);
|
effects->makeOpenGLContextCurrent();
|
||||||
m_texture.reset();
|
DecorationShadowTextureCache::instance().unregister(this);
|
||||||
|
m_texture.reset();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SceneOpenGLShadow::buildQuads()
|
void SceneOpenGLShadow::buildQuads()
|
||||||
|
|
Loading…
Reference in a new issue