scene: Avoid changing current opengl context if the shadow has no texture
If there's nothing to be destroyed, do nothing.
This commit is contained in:
parent
fd5807ecb7
commit
072d5ff045
1 changed files with 2 additions and 3 deletions
|
@ -174,9 +174,8 @@ OpenGLShadowTextureProvider::OpenGLShadowTextureProvider(Shadow *shadow)
|
|||
|
||||
OpenGLShadowTextureProvider::~OpenGLShadowTextureProvider()
|
||||
{
|
||||
WorkspaceScene *scene = Compositor::self()->scene();
|
||||
if (scene) {
|
||||
scene->makeOpenGLContextCurrent();
|
||||
if (m_texture) {
|
||||
Compositor::self()->scene()->makeOpenGLContextCurrent();
|
||||
DecorationShadowTextureCache::instance().unregister(this);
|
||||
m_texture.reset();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue