summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJiang Jiang <jiang.jiang@nokia.com>2011-04-27 06:47:46 (GMT)
committerJiang Jiang <jiang.jiang@nokia.com>2011-04-27 06:54:01 (GMT)
commitdcdb62c3d1a76d951c4b65bc1b1bd930e2ad14ec (patch)
treeadd33bed3935eb11301dbce03348e6072f96dc76 /src
parent1124f41253edd0e03704db72b0e1b6b4b518bd0f (diff)
downloadQt-dcdb62c3d1a76d951c4b65bc1b1bd930e2ad14ec.zip
Qt-dcdb62c3d1a76d951c4b65bc1b1bd930e2ad14ec.tar.gz
Qt-dcdb62c3d1a76d951c4b65bc1b1bd930e2ad14ec.tar.bz2
Make sure layoutData exist before checking for string direction
Otherwise accessing that through QTextEngine::alignLine may cause crash. Reviewed-by: Samuel Rødal
Diffstat (limited to 'src')
-rw-r--r--src/gui/text/qtextengine.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp
index ce012a8..cc150c5 100644
--- a/src/gui/text/qtextengine.cpp
+++ b/src/gui/text/qtextengine.cpp
@@ -1598,6 +1598,8 @@ bool QTextEngine::isRightToLeft() const
default:
break;
}
+ if (!layoutData)
+ itemize();
// this places the cursor in the right position depending on the keyboard layout
if (layoutData->string.isEmpty())
return QApplication::keyboardInputDirection() == Qt::RightToLeft;