From: Chris Adams Date: Mon, 19 Mar 2012 02:19:53 +0000 (+1000) Subject: Notify QQJSE::DW of expression deletion during dtor X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=26d5f2e833f0e3686aaa27e695bbfab5fbd808ad;p=konrad%2Fqtdeclarative.git Notify QQJSE::DW of expression deletion during dtor QQmlJavaScriptExpression::DeleteWatcher's wasDeleted() function simply checks to see if the pointer to the expression being watched is null. This commit ensures that the DeleteWatcher's expression pointer is set to null during QQJSE::dtor(). Change-Id: I566737bf30b4466ba96d771d9846fc3dd860cd2f Reviewed-by: Michael Brasser --- diff --git a/src/qml/qml/qqmljavascriptexpression.cpp b/src/qml/qml/qqmljavascriptexpression.cpp index 560e0f1..aad6a04 100644 --- a/src/qml/qml/qqmljavascriptexpression.cpp +++ b/src/qml/qml/qqmljavascriptexpression.cpp @@ -69,6 +69,8 @@ QQmlJavaScriptExpression::QQmlJavaScriptExpression(VTable *v) QQmlJavaScriptExpression::~QQmlJavaScriptExpression() { clearGuards(); + if (m_scopeObject.isT2()) // notify DeleteWatcher of our deletion. + m_scopeObject.asT2()->_s = 0; } void QQmlJavaScriptExpression::setNotifyOnValueChanged(bool v)