[scenes/opengl] Ensure there is current OpenGL context when destroying EffectFrame unstyled texture

Summary: BUG: 406671

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D20723
This commit is contained in:
Vlad Zagorodniy 2019-04-22 10:34:49 +03:00
parent e4456347c4
commit b617613bf7

View file

@ -369,13 +369,16 @@ SceneOpenGL::~SceneOpenGL()
{
// do cleanup after initBuffer()
gs_debuggedScene = nullptr;
SceneOpenGL::EffectFrame::cleanup();
if (init_ok) {
delete m_syncManager;
// backend might be still needed for a different scene
delete m_backend;
if (init_ok) {
makeOpenGLContextCurrent();
}
SceneOpenGL::EffectFrame::cleanup();
delete m_syncManager;
// backend might be still needed for a different scene
delete m_backend;
}
static void scheduleVboReInit()