summaryrefslogtreecommitdiffstats
path: root/src/gui/text
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-08-18 08:01:01 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-08-18 08:01:32 (GMT)
commit0e29b6085233bbd14471c7df466575750841f4d7 (patch)
tree808a3352162d002ab9fcaa7914278a1cdbc21173 /src/gui/text
parentfb4a884eb76a67919112f2a389283b1bd6d4848e (diff)
downloadQt-0e29b6085233bbd14471c7df466575750841f4d7.zip
Qt-0e29b6085233bbd14471c7df466575750841f4d7.tar.gz
Qt-0e29b6085233bbd14471c7df466575750841f4d7.tar.bz2
Fixed a possible crash in QTextCursor
Diffstat (limited to 'src/gui/text')
-rw-r--r--src/gui/text/qtextcursor.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/text/qtextcursor.cpp b/src/gui/text/qtextcursor.cpp
index 88ab9d0..5a938e3 100644
--- a/src/gui/text/qtextcursor.cpp
+++ b/src/gui/text/qtextcursor.cpp
@@ -84,7 +84,8 @@ QTextCursorPrivate::QTextCursorPrivate(const QTextCursorPrivate &rhs)
QTextCursorPrivate::~QTextCursorPrivate()
{
- priv->removeCursor(this);
+ if (priv)
+ priv->removeCursor(this);
}
QTextCursorPrivate::AdjustResult QTextCursorPrivate::adjustPosition(int positionOfChange, int charsAddedOrRemoved, QTextUndoCommand::Operation op)