summaryrefslogtreecommitdiff
path: root/src/opengl/qgltexturepool.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/qgltexturepool.cpp')
-rw-r--r--src/opengl/qgltexturepool.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/opengl/qgltexturepool.cpp b/src/opengl/qgltexturepool.cpp
index d19b1dbd2d..9ad66f2c3a 100644
--- a/src/opengl/qgltexturepool.cpp
+++ b/src/opengl/qgltexturepool.cpp
@@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE
Q_OPENGL_EXPORT extern QGLWidget* qt_gl_share_widget();
-Q_GLOBAL_STATIC(QGLTexturePool, qt_gl_texture_pool)
+static QGLTexturePool *qt_gl_texture_pool = 0;
class QGLTexturePoolPrivate
{
@@ -69,7 +69,9 @@ QGLTexturePool::~QGLTexturePool()
QGLTexturePool *QGLTexturePool::instance()
{
- return qt_gl_texture_pool();
+ if (!qt_gl_texture_pool)
+ qt_gl_texture_pool = new QGLTexturePool();
+ return qt_gl_texture_pool;
}
GLuint QGLTexturePool::createTexture(GLenum target,