From 81df02625ae7c5139fa409d1147a519629b7635c Mon Sep 17 00:00:00 2001 From: Jiang Jiang Date: Wed, 18 Jan 2012 14:58:41 +0100 Subject: Cleaning logClusters for line separator layout shortcut In some cases the logClusters are accessed, but we don't have actual glyphs generated for them. Task-number: QTBUG-23704 Change-Id: I719c183e17429941b32dd37bf8a4e5497edda6fe Reviewed-by: Andy Shaw Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/gui/text/qtextengine_mac.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/text/qtextengine_mac.cpp b/src/gui/text/qtextengine_mac.cpp index 7566d44..ead2806 100644 --- a/src/gui/text/qtextengine_mac.cpp +++ b/src/gui/text/qtextengine_mac.cpp @@ -608,8 +608,10 @@ void QTextEngine::shapeTextMac(int item) const // Skip shaping of line or paragraph separators since we are not // going to draw them anyway if (si.analysis.flags == QScriptAnalysis::LineOrParagraphSeparator - && !(option.flags() & QTextOption::ShowLineAndParagraphSeparators)) + && !(option.flags() & QTextOption::ShowLineAndParagraphSeparators)) { + memset(log_clusters, 0, len * sizeof(unsigned short)); goto cleanUp; + } if (!fe->stringToCMap(str, len, &g, &num_glyphs, flags, log_clusters, attributes(), &si)) { ensureSpace(num_glyphs); -- cgit v0.12