Qt: Fix regression with OpenGL deinitialization

This commit is contained in:
Jeffrey Pfau 2015-12-01 21:31:02 -08:00
parent e0863dc708
commit 78acb25afc
1 changed files with 5 additions and 0 deletions

View File

@ -237,12 +237,17 @@ PainterGL::~PainterGL() {
for (auto item : m_free) {
delete[] item;
}
m_gl->makeCurrent();
#if defined(_WIN32) && defined(USE_EPOXY)
epoxy_handle_external_wglMakeCurrent();
#endif
#if !defined(_WIN32) || defined(USE_EPOXY)
if (m_shader.passes) {
GBAGLES2ShaderFree(&m_shader);
}
#endif
m_backend->deinit(m_backend);
m_gl->doneCurrent();
delete m_backend;
m_backend = nullptr;
}