summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextlayout.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/text/qtextlayout.cpp')
-rw-r--r--src/gui/text/qtextlayout.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
index 62795f8..f8b0cbc 100644
--- a/src/gui/text/qtextlayout.cpp
+++ b/src/gui/text/qtextlayout.cpp
@@ -1807,7 +1807,8 @@ void QTextLine::layout_helper(int maxGlyphs)
QFontEngine *fontEngine = eng->fontEngine(current);
glyph_t glyph = glyphs.glyphs[logClusters[pos - 1]];
glyph_metrics_t gi = fontEngine->boundingBox(glyph);
- lbh.rightBearing = -qRound(gi.xoff - gi.x - gi.width);
+ if (gi.isValid())
+ lbh.rightBearing = -qRound(gi.xoff - gi.x - gi.width);
}
if ((sb_or_ws|breakany) && lbh.checkFullOtherwiseExtend(line)) {