Qt: Fix crash when using GL1 backend
Jeffrey Pfau jeffrey@endrift.com
Thu, 24 Dec 2015 15:38:42 -0800
1 files changed,
3 insertions(+),
1 deletions(-)
M
src/platform/qt/ShaderSelector.cpp
→
src/platform/qt/ShaderSelector.cpp
@@ -123,7 +123,9 @@ disconnect(this, SIGNAL(reset()), 0, 0);
disconnect(this, SIGNAL(resetToDefault()), 0, 0); #if !defined(_WIN32) || defined(USE_EPOXY) - m_ui.passes->addTab(makePage(static_cast<GBAGLES2Shader*>(m_shaders->preprocessShader), "default", 0), tr("Preprocessing")); + if (m_shaders->preprocessShader) { + m_ui.passes->addTab(makePage(static_cast<GBAGLES2Shader*>(m_shaders->preprocessShader), "default", 0), tr("Preprocessing")); + } GBAGLES2Shader* shaders = static_cast<GBAGLES2Shader*>(m_shaders->passes); QFileInfo fi(m_shaderPath); for (size_t p = 0; p < m_shaders->nPasses; ++p) {