summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsitem.cpp
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2011-03-01 09:40:06 (GMT)
committerJørgen Lind <jorgen.lind@nokia.com>2011-03-01 09:40:06 (GMT)
commit48cd01714e3aa76872983cae820cfc1c7504b065 (patch)
tree0d7cf0938619e845599fe2eb65f21e7999b66c50 /src/gui/graphicsview/qgraphicsitem.cpp
parent4d803a3493d15fdf7374689b774d02662dbd43b3 (diff)
parent54869c8727e5403cea866c99a5f83ae9c8533f82 (diff)
downloadQt-48cd01714e3aa76872983cae820cfc1c7504b065.zip
Qt-48cd01714e3aa76872983cae820cfc1c7504b065.tar.gz
Qt-48cd01714e3aa76872983cae820cfc1c7504b065.tar.bz2
Merge remote-tracking branch 'origin/master' into lighthouse-master
Diffstat (limited to 'src/gui/graphicsview/qgraphicsitem.cpp')
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 01fed8c..ecc8941 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -7689,11 +7689,13 @@ void QGraphicsObject::updateMicroFocus()
void QGraphicsItemPrivate::children_append(QDeclarativeListProperty<QGraphicsObject> *list, QGraphicsObject *item)
{
- QGraphicsObject *graphicsObject = static_cast<QGraphicsObject *>(list->object);
- if (QGraphicsItemPrivate::get(graphicsObject)->sendParentChangeNotification) {
- item->setParentItem(graphicsObject);
- } else {
- QGraphicsItemPrivate::get(item)->setParentItemHelper(graphicsObject, 0, 0);
+ if (item) {
+ QGraphicsObject *graphicsObject = static_cast<QGraphicsObject *>(list->object);
+ if (QGraphicsItemPrivate::get(graphicsObject)->sendParentChangeNotification) {
+ item->setParentItem(graphicsObject);
+ } else {
+ QGraphicsItemPrivate::get(item)->setParentItemHelper(graphicsObject, 0, 0);
+ }
}
}