From ca4f1b71faf0113f5030902ee03a39c169847526 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Mon, 17 May 2010 16:55:11 +1000 Subject: Restructure QDeclarativeAbstractBinding destructor --- src/declarative/qml/qdeclarativebinding.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/declarative/qml/qdeclarativebinding.cpp b/src/declarative/qml/qdeclarativebinding.cpp index 3e729c2..2e905b9 100644 --- a/src/declarative/qml/qdeclarativebinding.cpp +++ b/src/declarative/qml/qdeclarativebinding.cpp @@ -287,12 +287,14 @@ QDeclarativeAbstractBinding::QDeclarativeAbstractBinding() QDeclarativeAbstractBinding::~QDeclarativeAbstractBinding() { Q_ASSERT(m_prevBinding == 0); - if (m_mePtr) - *m_mePtr = 0; + Q_ASSERT(m_mePtr == 0); } void QDeclarativeAbstractBinding::destroy() { + removeFromObject(); + clear(); + delete this; } -- cgit v0.12