diff options
author | Tom Cooksey <thomas.cooksey@nokia.com> | 2009-04-16 15:57:00 (GMT) |
---|---|---|
committer | Tom Cooksey <thomas.cooksey@nokia.com> | 2009-04-16 15:57:00 (GMT) |
commit | 33957a2fee921742769e89ce6af348d182d183b2 (patch) | |
tree | 3754a66585df00e967e421b58ba97c562ca8cec8 /src/opengl/gl2paintengineex/qglengineshadermanager.cpp | |
parent | 1b3e9b38f981cfb458dbf9ed983c6e1687c3c874 (diff) | |
download | Qt-33957a2fee921742769e89ce6af348d182d183b2.zip Qt-33957a2fee921742769e89ce6af348d182d183b2.tar.gz Qt-33957a2fee921742769e89ce6af348d182d183b2.tar.bz2 |
Don't seg-fault when the shader prog is in the cache
Diffstat (limited to 'src/opengl/gl2paintengineex/qglengineshadermanager.cpp')
-rw-r--r-- | src/opengl/gl2paintengineex/qglengineshadermanager.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp index ea01604..1253414 100644 --- a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp +++ b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp @@ -211,6 +211,7 @@ QGLShaderProgram* QGLEngineShaderManager::simpleProgram() void QGLEngineShaderManager::useCorrectShaderProg() { QGLEngineShaderProg requiredProgram; + requiredProgram.program = 0; // Choose vertex shader main function QGLEngineShaderManager::ShaderName mainVertexShaderName = InvalidShaderName; @@ -375,7 +376,7 @@ void QGLEngineShaderManager::useCorrectShaderProg() && (prog.srcPixelFragShader == requiredProgram.srcPixelFragShader) && (prog.compositionFragShader == requiredProgram.compositionFragShader) ) { - currentShaderProg = requiredProgram.program; + currentShaderProg = prog.program; currentShaderProg->enable(); shaderProgNeedsChanging = false; return; |