aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/types
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-11-21 10:58:50 +0100
committerLiang Qi <liang.qi@qt.io>2017-11-21 10:58:51 +0100
commit848245c7d3e99f14f50417e45fcfdff2a7022502 (patch)
treea583ed65d09e27078f3178a7bbe890335c51a8a0 /src/qml/types
parentef10b82a28114718591bcdabec031ce05caacf37 (diff)
parent08778586413adad7b3af35c7cb97416757d599c0 (diff)
Merge remote-tracking branch 'origin/5.9.3' into 5.10.0
Diffstat (limited to 'src/qml/types')
-rw-r--r--src/qml/types/qqmldelegatemodel.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/types/qqmldelegatemodel.cpp b/src/qml/types/qqmldelegatemodel.cpp
index 4d2a9746c3..4ee1ab1b76 100644
--- a/src/qml/types/qqmldelegatemodel.cpp
+++ b/src/qml/types/qqmldelegatemodel.cpp
@@ -1957,6 +1957,8 @@ void QQmlDelegateModelItem::destroyObject()
Q_ASSERT(data);
if (data->ownContext) {
data->ownContext->clearContext();
+ if (data->ownContext->contextObject == object)
+ data->ownContext->contextObject = nullptr;
data->ownContext = 0;
data->context = 0;
}