summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2010-12-06 23:00:12 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2010-12-06 23:00:12 (GMT)
commite9cf90cffa279349ee9e84c8bcff0bbad173eaeb (patch)
tree3c722a18625e580c2e0e846514d44616191abbff /src/gui
parenta6733f5e70c6a4f3695dc380d1960d59f60e38b9 (diff)
parent6af078b2a13f4855a35d48376e58154ee2d57ec1 (diff)
downloadQt-e9cf90cffa279349ee9e84c8bcff0bbad173eaeb.zip
Qt-e9cf90cffa279349ee9e84c8bcff0bbad173eaeb.tar.gz
Qt-e9cf90cffa279349ee9e84c8bcff0bbad173eaeb.tar.bz2
Merge branch '4.7-upstream' into 4.7-water
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/text/qtextcursor.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/text/qtextcursor.cpp b/src/gui/text/qtextcursor.cpp
index 769ab2f..f73cc4b 100644
--- a/src/gui/text/qtextcursor.cpp
+++ b/src/gui/text/qtextcursor.cpp
@@ -363,6 +363,9 @@ bool QTextCursorPrivate::movePosition(QTextCursor::MoveOperation op, QTextCursor
bool adjustX = true;
QTextBlock blockIt = block();
+ if (!blockIt.isValid())
+ return false;
+
if (op >= QTextCursor::Left && op <= QTextCursor::WordRight
&& blockIt.textDirection() == Qt::RightToLeft) {
if (op == QTextCursor::Left)