summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@nokia.com>2010-06-16 11:41:46 (GMT)
committerTor Arne Vestbø <tor.arne.vestbo@nokia.com>2010-06-16 11:48:12 (GMT)
commit0842309e6e04d34c027374d0793dc60d3ec6e28b (patch)
tree7fe379e11da05532f2f38e59e9ee07fb95a57b31 /src/gui
parent7619c210217c85ef6e8d3571cce5d1272b1cb437 (diff)
downloadQt-0842309e6e04d34c027374d0793dc60d3ec6e28b.zip
Qt-0842309e6e04d34c027374d0793dc60d3ec6e28b.tar.gz
Qt-0842309e6e04d34c027374d0793dc60d3ec6e28b.tar.bz2
Fix crash on Mac OS X when drawing text with Qt::TextBypassShaping set
On Mac we end up in a code path where logClusters is 0, and the fallback path for when CoreText fails to shape text didn't take this into account. Reviewed-by: Simon Hausmann
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/text/qfontengine_mac.mm3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/text/qfontengine_mac.mm b/src/gui/text/qfontengine_mac.mm
index 3be6d28..7ceed61 100644
--- a/src/gui/text/qfontengine_mac.mm
+++ b/src/gui/text/qfontengine_mac.mm
@@ -237,7 +237,8 @@ bool QCoreTextFontEngineMulti::stringToCMap(const QChar *str, int len, QGlyphLay
*nglyphs = len;
for (int i = 0; i < len; ++i) {
outGlyphs[i] = 0;
- logClusters[i] = i;
+ if (logClusters)
+ logClusters[i] = i;
outAdvances_x[i] = QFixed();
outAdvances_y[i] = QFixed();
outAttributes[i].clusterStart = true;