diff options
author | Samuel Rødal <sroedal@trolltech.com> | 2009-09-03 12:37:53 (GMT) |
---|---|---|
committer | Samuel Rødal <sroedal@trolltech.com> | 2009-09-03 12:40:32 (GMT) |
commit | 4a4c99496c5840ac6cfef1c179942eb7ba9bd853 (patch) | |
tree | f208f04544ddf6e4eea05086257a218902d83387 /src/opengl/gl2paintengineex | |
parent | a554fbdfcf83873eea633efa1e7bd2a3dc22f54a (diff) | |
download | Qt-4a4c99496c5840ac6cfef1c179942eb7ba9bd853.zip Qt-4a4c99496c5840ac6cfef1c179942eb7ba9bd853.tar.gz Qt-4a4c99496c5840ac6cfef1c179942eb7ba9bd853.tar.bz2 |
Fixed crash in tst_qgl.
The shader manager needs to be recreated since the context it was
created with might not be valid any more.
Reviewed-by: Kim
Diffstat (limited to 'src/opengl/gl2paintengineex')
-rw-r--r-- | src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index ad22366..e24539b 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -1331,9 +1331,7 @@ bool QGL2PaintEngineEx::begin(QPaintDevice *pdev) qt_resolve_version_2_0_functions(d->ctx); #endif - if (!d->shaderManager) - d->shaderManager = new QGLEngineShaderManager(d->ctx); - d->shaderManager->setDirty(); + d->shaderManager = new QGLEngineShaderManager(d->ctx); glViewport(0, 0, d->width, d->height); @@ -1417,6 +1415,9 @@ bool QGL2PaintEngineEx::end() d->resetGLState(); + delete d->shaderManager; + d->shaderManager = 0; + return false; } |