summaryrefslogtreecommitdiffstats
path: root/src/opengl/qwindowsurface_gl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/qwindowsurface_gl.cpp')
-rw-r--r--src/opengl/qwindowsurface_gl.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp
index cdfaa3c329..3a7a07e74c 100644
--- a/src/opengl/qwindowsurface_gl.cpp
+++ b/src/opengl/qwindowsurface_gl.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtOpenGL module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -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;