diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-02-06 16:47:29 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-07 12:44:12 +0100 |
commit | 1583093081d6d74acd7618880c7d6101961f47ad (patch) | |
tree | eb8020c7ab0eddde75abb395f6195a48982dbaf7 /src/qml/qml/qqmlincubator.cpp | |
parent | 324ae0d7d99ef9f7159d29b2e0e7eabe5f8a43a4 (diff) |
[new compiler] Fix tst_qqmlincubator::deleteContext
Protect against QQmlContext deletion during incubation re-using the existing
QQmlContextGuard.
Change-Id: Ia1c0241029765cc2e00a9b0ffcf484127de20606
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlincubator.cpp')
-rw-r--r-- | src/qml/qml/qqmlincubator.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlincubator.cpp b/src/qml/qml/qqmlincubator.cpp index de8eab7bd2..1cc75387a3 100644 --- a/src/qml/qml/qqmlincubator.cpp +++ b/src/qml/qml/qqmlincubator.cpp @@ -98,7 +98,10 @@ void QQmlEnginePrivate::incubate(QQmlIncubator &i, QQmlContextData *forContext) incubatorList.insert(p.data()); incubatorCount++; - p->vmeGuard.guard(&p->vme); + if (useNewCompiler) + p->vmeGuard.guard(p->creator.data()); + else + p->vmeGuard.guard(&p->vme); p->changeStatus(QQmlIncubator::Loading); if (incubationController) @@ -379,7 +382,10 @@ finishIncubate: } } } else { - vmeGuard.guard(&vme); + if (enginePriv->useNewCompiler) + vmeGuard.guard(creator.data()); + else + vmeGuard.guard(&vme); } } |