summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl/qopengltextureglyphcache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/opengl/qopengltextureglyphcache.cpp')
-rw-r--r--src/gui/opengl/qopengltextureglyphcache.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/opengl/qopengltextureglyphcache.cpp b/src/gui/opengl/qopengltextureglyphcache.cpp
index b37e8fb972c..790b92a686f 100644
--- a/src/gui/opengl/qopengltextureglyphcache.cpp
+++ b/src/gui/opengl/qopengltextureglyphcache.cpp
@@ -106,8 +106,10 @@ void QOpenGLTextureGlyphCache::createTextureData(int width, int height)
if (height < 16)
height = 16;
- if (m_textureResource && !m_textureResource->m_texture)
+ if (m_textureResource && !m_textureResource->m_texture) {
delete m_textureResource;
+ m_textureResource = 0;
+ }
if (!m_textureResource)
m_textureResource = new QOpenGLGlyphTexture(ctx);