summaryrefslogtreecommitdiffstats
path: root/src/opengl/qwindowsurface_gl.cpp
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-03-26 09:14:07 (GMT)
committerSamuel Rødal <sroedal@trolltech.com>2009-04-16 08:43:00 (GMT)
commitb1c0c0bf169d4ab83ce6e9b1b333e99610aa6f6d (patch)
tree455cdf184dfa06216d669dd923a080f0bae7f1d6 /src/opengl/qwindowsurface_gl.cpp
parentd4eb0a29e73eb1f6c7e2909e6ae0302605927e02 (diff)
downloadQt-b1c0c0bf169d4ab83ce6e9b1b333e99610aa6f6d.zip
Qt-b1c0c0bf169d4ab83ce6e9b1b333e99610aa6f6d.tar.gz
Qt-b1c0c0bf169d4ab83ce6e9b1b333e99610aa6f6d.tar.bz2
Ensure we don't access the GL share widget when it's being destroyed.
Zero the pointer before destroying the widget, as QGLWidget's destructor may indirectly trigger access to the share widget.
Diffstat (limited to 'src/opengl/qwindowsurface_gl.cpp')
-rw-r--r--src/opengl/qwindowsurface_gl.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp
index b4a4565..bed08cf 100644
--- a/src/opengl/qwindowsurface_gl.cpp
+++ b/src/opengl/qwindowsurface_gl.cpp
@@ -187,9 +187,10 @@ public:
}
void cleanup() {
- delete widget;
- widget = 0;
+ QGLWidget *w = widget;
cleanedUp = true;
+ widget = 0;
+ delete w;
}
static bool cleanedUp;