aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Alpert <aalpert@blackberry.com>2013-08-21 13:21:03 -0700
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-22 21:12:58 +0200
commitfac5337abfef36c631fe73152157446aae0ea3ea (patch)
treea54f9cd915cf480487359ffb7ad86d65f2ddeb5e /src
parentda91b1c7312379ee18118059ee03faaf147a7d17 (diff)
Don't crash with deferred properties
There are cases where a qmlExecuteDeferred(o) can be postponed until the context of o is being destroyed, at which point it's too late to create an object in that context. Task-number: QTBUG-33112 Change-Id: I7f981b5e34e3cb8a52c00de4742a7242d7e4df54 Reviewed-by: Christopher Adams <chris.adams@jollamobile.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/qml/qml/qqmlengine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index a2a40c592d..5c59cc3383 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -1287,7 +1287,7 @@ void qmlExecuteDeferred(QObject *object)
{
QQmlData *data = QQmlData::get(object);
- if (data && data->deferredData) {
+ if (data && data->deferredData && !data->wasDeleted(object)) {
QQmlObjectCreatingProfiler prof;
if (prof.enabled) {
QQmlType *type = QQmlMetaType::qmlType(object->metaObject());