mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix crash if loading a shader fails
This commit is contained in:
parent
7ffa0ff280
commit
e504ac3665
1
CHANGES
1
CHANGES
|
@ -22,6 +22,7 @@ Other fixes:
|
|||
- Qt: Fix modifier key names in shortcut editor (fixes mgba.io/i/2817)
|
||||
- Qt: Fix a handful of edge cases with graphics viewers (fixes mgba.io/i/2827)
|
||||
- Qt: Fix full-buffer rewind
|
||||
- Qt: Fix crash if loading a shader fails
|
||||
- Scripting: Fix receiving packets for client sockets
|
||||
- Scripting: Fix empty receive calls returning unknown error on Windows
|
||||
Misc:
|
||||
|
|
|
@ -915,8 +915,9 @@ void PainterGL::setShaders(struct VDir* dir) {
|
|||
mGLES2ShaderDetach(reinterpret_cast<mGLES2Context*>(m_backend));
|
||||
mGLES2ShaderFree(&m_shader);
|
||||
}
|
||||
mGLES2ShaderLoad(&m_shader, dir);
|
||||
mGLES2ShaderAttach(reinterpret_cast<mGLES2Context*>(m_backend), static_cast<mGLES2Shader*>(m_shader.passes), m_shader.nPasses);
|
||||
if (mGLES2ShaderLoad(&m_shader, dir)) {
|
||||
mGLES2ShaderAttach(reinterpret_cast<mGLES2Context*>(m_backend), static_cast<mGLES2Shader*>(m_shader.passes), m_shader.nPasses);
|
||||
}
|
||||
|
||||
if (!m_started) {
|
||||
m_gl->doneCurrent();
|
||||
|
|
Loading…
Reference in New Issue