summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiang Jiang <jiang.jiang@nokia.com>2011-07-25 13:23:54 (GMT)
committerJiang Jiang <jiang.jiang@nokia.com>2011-07-25 13:42:26 (GMT)
commit06f079e528bf135e5d407b15d1bd50a91ce4a888 (patch)
tree59b1d0098cdc223fa38511ab8afafcd95053a7da
parentc9d2445bc3bbccd3cc6cfb95f09108cabe981840 (diff)
downloadQt-06f079e528bf135e5d407b15d1bd50a91ce4a888.zip
Qt-06f079e528bf135e5d407b15d1bd50a91ce4a888.tar.gz
Qt-06f079e528bf135e5d407b15d1bd50a91ce4a888.tar.bz2
Reset previousGlyph once we reached a new text item
The bug was introduced in fd818312. Before that, previousGlyph is only saved in the same text item. After we moved it to LineBreakHelper struct, it will cause crash if the font engine in the new text item no longer contains the sub engine required by previousGlyph. Task-number: QTBUG-20243 Reviewed-by: Eskil
-rw-r--r--src/gui/text/qtextlayout.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
index 183bcea..01adecf 100644
--- a/src/gui/text/qtextlayout.cpp
+++ b/src/gui/text/qtextlayout.cpp
@@ -1869,6 +1869,7 @@ void QTextLine::layout_helper(int maxGlyphs)
lbh.currentPosition = qMax(line.from, current.position);
end = current.position + eng->length(item);
lbh.glyphs = eng->shapedGlyphs(&current);
+ lbh.previousGlyph = 0;
QFontEngine *fontEngine = eng->fontEngine(current);
if (lbh.fontEngine != fontEngine) {
lbh.fontEngine = fontEngine;