diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2009-06-17 09:10:38 (GMT) |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2009-06-17 09:10:38 (GMT) |
commit | 9fb3b6c953228023eb735c31b8610f2171999015 (patch) | |
tree | 75008f8b454990a0ba463026dd8c10a5672d138f /src/opengl/qwindowsurface_gl.cpp | |
parent | 89e6d626f1e23858735659a1596408cd7a521c02 (diff) | |
parent | 368c3c936fc12ef5249d72ffa5541df3b8558e4d (diff) | |
download | Qt-9fb3b6c953228023eb735c31b8610f2171999015.zip Qt-9fb3b6c953228023eb735c31b8610f2171999015.tar.gz Qt-9fb3b6c953228023eb735c31b8610f2171999015.tar.bz2 |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'src/opengl/qwindowsurface_gl.cpp')
-rw-r--r-- | src/opengl/qwindowsurface_gl.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp index 50d0ae7..3a7a07e 100644 --- a/src/opengl/qwindowsurface_gl.cpp +++ b/src/opengl/qwindowsurface_gl.cpp @@ -184,11 +184,13 @@ QGLGraphicsSystem::QGLGraphicsSystem() class QGLGlobalShareWidget { public: - QGLGlobalShareWidget() : widget(0) {} + QGLGlobalShareWidget() : widget(0), initializing(false) {} QGLWidget *shareWidget() { - if (!widget && !cleanedUp) { + if (!initializing && !widget && !cleanedUp) { + initializing = true; widget = new QGLWidget; + initializing = false; } return widget; } @@ -204,6 +206,7 @@ public: private: QGLWidget *widget; + bool initializing; }; bool QGLGlobalShareWidget::cleanedUp = false; |