summaryrefslogtreecommitdiffstats
path: root/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2009-04-16 15:57:00 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2009-04-16 15:57:00 (GMT)
commit33957a2fee921742769e89ce6af348d182d183b2 (patch)
tree3754a66585df00e967e421b58ba97c562ca8cec8 /src/opengl/gl2paintengineex/qglengineshadermanager.cpp
parent1b3e9b38f981cfb458dbf9ed983c6e1687c3c874 (diff)
downloadQt-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.cpp3
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;