diff options
author | Tor Arne Vestbø <tor.arne.vestbo@nokia.com> | 2010-06-16 11:41:46 (GMT) |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@nokia.com> | 2010-06-16 11:48:12 (GMT) |
commit | 0842309e6e04d34c027374d0793dc60d3ec6e28b (patch) | |
tree | 7fe379e11da05532f2f38e59e9ee07fb95a57b31 /src/gui/text | |
parent | 7619c210217c85ef6e8d3571cce5d1272b1cb437 (diff) | |
download | Qt-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/text')
-rw-r--r-- | src/gui/text/qfontengine_mac.mm | 3 |
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; |