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
f9399d69ad also landed in stable.
Change-Id: I0a4f4fbb1727e5b4ad497b08177d14c81abd2dd0
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
bb10
parent
753b472cb8
commit
aff3e3c4a2
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue