diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2012-07-13 14:17:26 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-14 02:41:05 +0200 |
commit | 28826fe4631ae06b49bf718c807accab6a6eb89b (patch) | |
tree | 36b7d19e49f83689dd1ab88136f79eb0df37dcdf /src | |
parent | 6f540691c4787746f5269447d518fe00ae17268d (diff) |
Avoid crash when getting bearings from fallback font engine
When accessing a fallback engine, we always need to call
ensureEngineAt() to make sure it's loaded.
Change-Id: Ib27e34137cfe8a3dd2b358aef3b3296a4ca52478
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/text/qfontengine.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp index e757102db0..1ae50c75d8 100644 --- a/src/gui/text/qfontengine.cpp +++ b/src/gui/text/qfontengine.cpp @@ -1489,6 +1489,7 @@ glyph_metrics_t QFontEngineMulti::boundingBox(const QGlyphLayout &glyphs) void QFontEngineMulti::getGlyphBearings(glyph_t glyph, qreal *leftBearing, qreal *rightBearing) { int which = highByte(glyph); + ensureEngineAt(which); engine(which)->getGlyphBearings(stripped(glyph), leftBearing, rightBearing); } |