summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-12-06 14:11:43 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-12-06 14:11:43 (GMT)
commit6af078b2a13f4855a35d48376e58154ee2d57ec1 (patch)
tree6e2731b2a7b4f0af40b9e32215295745487f09c5
parent9327490ad51b737211c26cae53a095a8485e2dad (diff)
parent6ae84f1183e91c910ca92a55e37f8254ace805c0 (diff)
downloadQt-6af078b2a13f4855a35d48376e58154ee2d57ec1.zip
Qt-6af078b2a13f4855a35d48376e58154ee2d57ec1.tar.gz
Qt-6af078b2a13f4855a35d48376e58154ee2d57ec1.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fix QTextEdit::selectAll crash from textChanged()
-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)