diff options
Diffstat (limited to 'src/qml/qml/qqmlengine.cpp')
-rw-r--r-- | src/qml/qml/qqmlengine.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index f31db457d3..13b17e6946 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -716,6 +716,8 @@ void QQmlPrivate::qdeclarativeelement_destructor(QObject *o) for (QQmlContextData *lc = d->ownContext->linkedContext; lc; lc = lc->linkedContext) lc->invalidate(); d->ownContext->invalidate(); + if (d->ownContext->contextObject == o) + d->ownContext->contextObject = nullptr; d->ownContext = 0; d->context = 0; } |