aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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 246df4c4e9..77de84bf90 100644
--- a/src/qml/jsruntime/qv4qobjectwrapper.cpp
+++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp
@@ -1042,6 +1042,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();
}
}
}