diff options
author | Yoann Lopes <yoann.lopes@nokia.com> | 2011-01-07 13:29:38 (GMT) |
---|---|---|
committer | Yoann Lopes <yoann.lopes@nokia.com> | 2011-01-07 13:29:38 (GMT) |
commit | 8ffb49a4ac68b1c243b25343053e6e99f97ec2e7 (patch) | |
tree | 9d50f23c3c614e358bdd903a54970701bf851e23 /src/gui | |
parent | 67267842ce658d956f11d52194566b6de1f84f9a (diff) | |
download | Qt-8ffb49a4ac68b1c243b25343053e6e99f97ec2e7.zip Qt-8ffb49a4ac68b1c243b25343053e6e99f97ec2e7.tar.gz Qt-8ffb49a4ac68b1c243b25343053e6e99f97ec2e7.tar.bz2 |
Fixes crash in QGraphicsItem's destructor.
Crash introduced by 783a278f243c6411f5f32d11f2165b9eed9b6f8c.
Autotest written by Niklas Kurkisuo <ext-niklas.kurkisuo@nokia.com>
Task-number: QTBUG-16374
Reviewed-by: TrustMe
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/graphicsview/qgraphicsitem.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 94e1a72..e52c970 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -5589,9 +5589,11 @@ void QGraphicsItemPrivate::clearSubFocus(QGraphicsItem *rootItem, QGraphicsItem // Reset sub focus chain. QGraphicsItem *parent = rootItem ? rootItem : q_ptr; do { - if (parent->d_ptr->subFocusItem != q_ptr || parent == stopItem) + if (parent->d_ptr->subFocusItem != q_ptr) break; parent->d_ptr->subFocusItem = 0; + if (parent == stopItem) + break; parent->d_ptr->subFocusItemChange(); } while (!parent->isPanel() && (parent = parent->d_ptr->parent)); } |