15 lines
756 B
Diff
15 lines
756 B
Diff
diff -up qt-everywhere-opensource-src-4.8.1/src/gui/text/qtextlayout.cpp.QTBUG-24718 qt-everywhere-opensource-src-4.8.1/src/gui/text/qtextlayout.cpp
|
|
--- qt-everywhere-opensource-src-4.8.1/src/gui/text/qtextlayout.cpp.QTBUG-24718 2012-03-14 15:01:14.000000000 +0100
|
|
+++ qt-everywhere-opensource-src-4.8.1/src/gui/text/qtextlayout.cpp 2012-04-03 10:53:12.973058622 +0200
|
|
@@ -2508,6 +2508,10 @@ qreal QTextLine::cursorToX(int *cursorPo
|
|
int pos = *cursorPos;
|
|
int itm;
|
|
const HB_CharAttributes *attributes = eng->attributes();
|
|
+ if (!attributes) {
|
|
+ *cursorPos = 0;
|
|
+ return x.toReal();
|
|
+ }
|
|
while (pos < line.from + line.length && !attributes[pos].charStop)
|
|
pos++;
|
|
if (pos == line.from + (int)line.length) {
|