mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix crash unloading shaders
This commit is contained in:
parent
6ba8f2321b
commit
ef5ef903fe
1
CHANGES
1
CHANGES
|
@ -9,6 +9,7 @@ Other fixes:
|
|||
- Qt: Fix race condition with proxied video events
|
||||
- Qt: Fix color selection in asset view (fixes mgba.io/i/1648)
|
||||
- Qt: Fix missing OSD messages
|
||||
- Qt: Fix crash unloading shaders
|
||||
|
||||
0.8.0: (2020-01-21)
|
||||
Features:
|
||||
|
|
|
@ -566,10 +566,19 @@ void PainterGL::clearShaders() {
|
|||
return;
|
||||
}
|
||||
#ifdef BUILD_GLES2
|
||||
if (!m_started) {
|
||||
m_gl->makeCurrent(m_surface);
|
||||
#if defined(_WIN32) && defined(USE_EPOXY)
|
||||
epoxy_handle_external_wglMakeCurrent();
|
||||
#endif
|
||||
}
|
||||
if (m_shader.passes) {
|
||||
mGLES2ShaderDetach(reinterpret_cast<mGLES2Context*>(m_backend));
|
||||
mGLES2ShaderFree(&m_shader);
|
||||
}
|
||||
if (!m_started) {
|
||||
m_gl->doneCurrent();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue