diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-08-18 08:01:01 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-08-18 08:01:32 (GMT) |
commit | 0e29b6085233bbd14471c7df466575750841f4d7 (patch) | |
tree | 808a3352162d002ab9fcaa7914278a1cdbc21173 | |
parent | fb4a884eb76a67919112f2a389283b1bd6d4848e (diff) | |
download | Qt-0e29b6085233bbd14471c7df466575750841f4d7.zip Qt-0e29b6085233bbd14471c7df466575750841f4d7.tar.gz Qt-0e29b6085233bbd14471c7df466575750841f4d7.tar.bz2 |
Fixed a possible crash in QTextCursor
-rw-r--r-- | src/gui/text/qtextcursor.cpp | 3 |
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) |