From 6028d8ebceccc4edd7c31ba0d16773ae866336c3 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Wed, 5 Oct 2011 18:15:03 +1000 Subject: Always delete object if incubator is cancelled Change-Id: Iad04340bac9d1345069e540e6bf9dbf671ce9226 Reviewed-on: http://codereview.qt-project.org/6088 Reviewed-by: Qt Sanity Bot Reviewed-by: Aaron Kennedy --- src/declarative/qml/qdeclarativeincubator.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/declarative/qml/qdeclarativeincubator.cpp b/src/declarative/qml/qdeclarativeincubator.cpp index ed75c9a1eb..4779caf214 100644 --- a/src/declarative/qml/qdeclarativeincubator.cpp +++ b/src/declarative/qml/qdeclarativeincubator.cpp @@ -486,6 +486,8 @@ void QDeclarativeIncubator::clear() if (s == Loading) { Q_ASSERT(d->component); enginePriv = QDeclarativeEnginePrivate::get(d->component->engine); + delete d->result; + d->result = 0; } d->clear(); -- cgit v1.2.3