diff options
Diffstat (limited to 'src/opengl/qgltexturepool.cpp')
-rw-r--r-- | src/opengl/qgltexturepool.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/opengl/qgltexturepool.cpp b/src/opengl/qgltexturepool.cpp index d19b1db..9ad66f2 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, |