aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4qobjectwrapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4qobjectwrapper.cpp')
-rw-r--r--src/qml/jsruntime/qv4qobjectwrapper.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp
index ea3cfabf4d..2c9fc8f9dd 100644
--- a/src/qml/jsruntime/qv4qobjectwrapper.cpp
+++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp
@@ -1045,6 +1045,10 @@ void QObjectWrapper::destroyObject(bool lastCall)
delete h->object;
else
h->object->deleteLater();
+ } else {
+ // If the object is C++-owned, we still have to release the weak reference we have
+ // to it.
+ ddata->jsWrapper.clear();
}
}
}