aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativeincubator_p.h
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2011-11-30 09:44:13 +1000
committerQt by Nokia <qt-info@nokia.com>2011-11-30 04:34:34 +0100
commit9321a19664ca7409f599b68e3784bbd5bd321a54 (patch)
treea0f1a17154db66cb95611c1ea11f83f4b01c5a4c /src/declarative/qml/qdeclarativeincubator_p.h
parenta782a3e5d6c73aaa8de065452349a7b925c0faf9 (diff)
Deleting an incubated object after setInitialState() crashes
Incubating objects are often parented in setInitialState(), which can lead to the incubating object being deleted after object creation, but before completion. When incubator.clear() is called after this point, it would attempt to delete the already deleted object. This change guards the incubation object in the incubator. Change-Id: I9585e93027250b8b6b3f1777b10ee1008ae7b818 Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
Diffstat (limited to 'src/declarative/qml/qdeclarativeincubator_p.h')
-rw-r--r--src/declarative/qml/qdeclarativeincubator_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativeincubator_p.h b/src/declarative/qml/qdeclarativeincubator_p.h
index ebabbae1d2..8f76239c10 100644
--- a/src/declarative/qml/qdeclarativeincubator_p.h
+++ b/src/declarative/qml/qdeclarativeincubator_p.h
@@ -83,7 +83,7 @@ public:
enum Progress { Execute, Completing, Completed };
Progress progress;
- QObject *result;
+ QDeclarativeGuard<QObject> result;
QDeclarativeGuardedContextData rootContext;
QDeclarativeCompiledData *component;
QDeclarativeVME vme;