Fix QOpenGLGlyphTexture object leak
Call clear() in the destructor of QOpenGLTextureGlyphCache class to prevent QOpenGLGlyphTexture object leak. Change-Id: I290b09b0786d30603391e6855a21e9232b112739 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>bb10
parent
6e32a58428
commit
1d58face30
|
|
@ -87,6 +87,7 @@ QOpenGLTextureGlyphCache::~QOpenGLTextureGlyphCache()
|
|||
#ifdef QT_GL_TEXTURE_GLYPH_CACHE_DEBUG
|
||||
qDebug(" -> ~QOpenGLTextureGlyphCache() %p.", this);
|
||||
#endif
|
||||
clear();
|
||||
}
|
||||
|
||||
static inline bool isCoreProfile()
|
||||
|
|
@ -447,7 +448,8 @@ int QOpenGLTextureGlyphCache::maxTextureHeight() const
|
|||
|
||||
void QOpenGLTextureGlyphCache::clear()
|
||||
{
|
||||
m_textureResource->free();
|
||||
if (m_textureResource)
|
||||
m_textureResource->free();
|
||||
m_textureResource = 0;
|
||||
|
||||
m_w = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue