diff options
author | Jiang Jiang <jiang.jiang@nokia.com> | 2011-07-25 13:23:54 (GMT) |
---|---|---|
committer | Jiang Jiang <jiang.jiang@nokia.com> | 2011-07-25 13:42:26 (GMT) |
commit | 06f079e528bf135e5d407b15d1bd50a91ce4a888 (patch) | |
tree | 59b1d0098cdc223fa38511ab8afafcd95053a7da | |
parent | c9d2445bc3bbccd3cc6cfb95f09108cabe981840 (diff) | |
download | Qt-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.cpp | 1 |
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(¤t); + lbh.previousGlyph = 0; QFontEngine *fontEngine = eng->fontEngine(current); if (lbh.fontEngine != fontEngine) { lbh.fontEngine = fontEngine; |