diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-03-15 10:03:02 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-15 16:00:38 +0100 |
commit | af41170bc5e4c1be194bb9bbe883b00c2f7062b7 (patch) | |
tree | 60d7d2a502972ccc96c9cab0893de194a89078dc /src/qml/qml/qqmlobjectcreator.cpp | |
parent | 3affc261aaa12105dbad60bfa7014126ce4dfcca (diff) |
Fix crash on shutdown with states
When populating deferred properties, we must not set the rootObjectInCreation
flags on the root context and (consequently) on any sub-objects objects created
when initializing deferred properties. Doing so otherwise will end up us
incorrectly linking QQmlContextData together, causing QQmlData::linkedContext
to point to iself and crash on exit upon deletion.
Task-number: QTBUG-37484
Change-Id: Ia5dc92a04e0f66499f15fbac10f14859d387b021
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlobjectcreator.cpp')
-rw-r--r-- | src/qml/qml/qqmlobjectcreator.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp index 50fe5861a6..d0852bbef2 100644 --- a/src/qml/qml/qqmlobjectcreator.cpp +++ b/src/qml/qml/qqmlobjectcreator.cpp @@ -241,6 +241,7 @@ bool QQmlObjectCreator::populateDeferredProperties(QObject *instance) { QQmlData *declarativeData = QQmlData::get(instance); context = declarativeData->deferredData->context; + sharedState->rootContext = context; const int objectIndex = declarativeData->deferredData->deferredIdx; const QV4::CompiledData::Object *obj = qmlUnit->objectAt(objectIndex); |