summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl_qpa.cpp
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2010-07-26 06:15:22 (GMT)
committerJørgen Lind <jorgen.lind@nokia.com>2010-07-26 06:15:22 (GMT)
commit11a16e38df8022b41aae0d41a67e8b5542801d1c (patch)
treee24794f4f7a9d06d3da5431d79e98762a2bf7101 /src/opengl/qgl_qpa.cpp
parent4fb48f92e7553e8854c943e6117875c2e2b393f1 (diff)
downloadQt-11a16e38df8022b41aae0d41a67e8b5542801d1c.zip
Qt-11a16e38df8022b41aae0d41a67e8b5542801d1c.tar.gz
Qt-11a16e38df8022b41aae0d41a67e8b5542801d1c.tar.bz2
fix QGLContext::reset in lighthouse
Diffstat (limited to 'src/opengl/qgl_qpa.cpp')
-rw-r--r--src/opengl/qgl_qpa.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/opengl/qgl_qpa.cpp b/src/opengl/qgl_qpa.cpp
index 0fc885c..917842b 100644
--- a/src/opengl/qgl_qpa.cpp
+++ b/src/opengl/qgl_qpa.cpp
@@ -87,8 +87,10 @@ void QGLContext::reset()
doneCurrent();
if (d->platformContext) {
- //dont delete. This will be done by the platform
- d->platformContext = 0;
+ if (d->paintDevice && d->paintDevice->devType() == QInternal::Widget) {
+ QWidget *widget = static_cast<QWidget *>(d->paintDevice);
+ widget->destroy();
+ }
}
d->crWin = false;