diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-01-03 12:18:19 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-03 13:00:18 +0100 |
commit | aff3e3c4a20aae52fdafaede8dfcbde2bc990104 (patch) | |
tree | 4a710c43511e13a5f0c293fb6fff1f8953146636 /src/gui/painting/qtextureglyphcache.cpp | |
parent | 753b472cb851bf12033b1e3ae663b4bdd056d1ef (diff) |
Make texture glyph cache more robust against missing glyphs
This fixes failing assertions in the CI system. All the callers of
lockedAlphaMapForGlyph always check the return value for being null as well as
the image itself, so we need to do the same here as well before calling
unlockAlphaMapForGlyph.
This is proposed to stable because commit
f9399d69add411adf757e3390488ff57655833b7 also landed in stable.
Change-Id: I0a4f4fbb1727e5b4ad497b08177d14c81abd2dd0
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Diffstat (limited to 'src/gui/painting/qtextureglyphcache.cpp')
-rw-r--r-- | src/gui/painting/qtextureglyphcache.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/painting/qtextureglyphcache.cpp b/src/gui/painting/qtextureglyphcache.cpp index b953f8d81f..e340c1e613 100644 --- a/src/gui/painting/qtextureglyphcache.cpp +++ b/src/gui/painting/qtextureglyphcache.cpp @@ -160,7 +160,7 @@ bool QTextureGlyphCache::populate(QFontEngine *fontEngine, int numGlyphs, const // proper metrics will be cached and used later. if (fontEngine->hasInternalCaching()) { QImage *locked = fontEngine->lockedAlphaMapForGlyph(glyph, subPixelPosition, format); - if (locked) + if (locked && !locked->isNull()) fontEngine->unlockAlphaMapForGlyph(); } |