aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickstateoperations.cpp
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-01-11 08:53:58 +0100
committerHolger Freyther <holger+qt@freyther.de>2015-01-14 09:23:34 +0100
commita25dc5dba367f595a62ac9e17717d32f3f723a96 (patch)
tree08faa4cd102be8f2fae710af61744dafc85fe20f /src/quick/items/qquickstateoperations.cpp
parent8096aa6fc9e362ba1f3c98bc165fac0feaad914a (diff)
Add null check for target as well
I couldn't see any documentation for the implication that if stackBefore is set then target must not be null. Coverity didn't find that implication either. Change-Id: Ifb93aa4c1e40f417033057b9a403d368dfdf0ba8 Fixes: Coverity CID 10627 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/quick/items/qquickstateoperations.cpp')
-rw-r--r--src/quick/items/qquickstateoperations.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/items/qquickstateoperations.cpp b/src/quick/items/qquickstateoperations.cpp
index ad442512a7..79e238652b 100644
--- a/src/quick/items/qquickstateoperations.cpp
+++ b/src/quick/items/qquickstateoperations.cpp
@@ -134,7 +134,7 @@ void QQuickParentChangePrivate::doChange(QQuickItem *targetParent, QQuickItem *s
//restore the original stack position.
//### if stackBefore has also been reparented this won't work
- if (stackBefore)
+ if (target && stackBefore)
target->stackBefore(stackBefore);
}