summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2010-02-08 11:25:10 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2010-02-08 11:39:19 (GMT)
commit7724c474a941ea3516da6102a16b30ca254afe53 (patch)
tree6e8b751da64bfa25f88b53c732107cbb0d582822 /src
parenta8d09369fea1574b24309d7b7b2bb373021bf387 (diff)
downloadQt-7724c474a941ea3516da6102a16b30ca254afe53.zip
Qt-7724c474a941ea3516da6102a16b30ca254afe53.tar.gz
Qt-7724c474a941ea3516da6102a16b30ca254afe53.tar.bz2
QGraphicsItem: Do not crash at exit if there is static QGraphicsItem.
The DataStore could have been destroyed before. Even if having static QGraphicsItem is not really supported, it is better not to crash Task-number: QTBUG-7629 Reviewed-by: bnilsen
Diffstat (limited to 'src')
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index b4e19d1..39c41c4 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -1392,7 +1392,8 @@ QGraphicsItem::~QGraphicsItem()
}
delete d_ptr->transformData;
- qt_dataStore()->data.remove(this);
+ if (QGraphicsItemCustomDataStore *dataStore = qt_dataStore())
+ dataStore->data.remove(this);
}
/*!