diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2011-03-01 09:40:06 (GMT) |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2011-03-01 09:40:06 (GMT) |
commit | 48cd01714e3aa76872983cae820cfc1c7504b065 (patch) | |
tree | 0d7cf0938619e845599fe2eb65f21e7999b66c50 /src/gui/graphicsview/qgraphicsitem.cpp | |
parent | 4d803a3493d15fdf7374689b774d02662dbd43b3 (diff) | |
parent | 54869c8727e5403cea866c99a5f83ae9c8533f82 (diff) | |
download | Qt-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.cpp | 12 |
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); + } } } |