Qt: Fix crash when using GL1 backend

This commit is contained in:
Jeffrey Pfau 2015-12-24 15:38:42 -08:00
parent ccaec37867
commit dcbcae26da
1 changed files with 3 additions and 1 deletions

View File

@ -123,7 +123,9 @@ void ShaderSelector::refreshShaders() {
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) {