aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlincubator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/qqmlincubator.cpp')
-rw-r--r--src/qml/qml/qqmlincubator.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlincubator.cpp b/src/qml/qml/qqmlincubator.cpp
index 1cc75387a3..da4de338ee 100644
--- a/src/qml/qml/qqmlincubator.cpp
+++ b/src/qml/qml/qqmlincubator.cpp
@@ -298,7 +298,7 @@ void QQmlIncubatorPrivate::incubate(QQmlInstantiationInterrupt &i)
enginePriv->referenceScarceResources();
QObject *tresult = 0;
if (enginePriv->useNewCompiler) {
- tresult = creator->create(subComponentToCreate);
+ tresult = creator->create(subComponentToCreate, /*parent*/0, &i);
if (!tresult)
errors = creator->errors;
} else {
@@ -582,8 +582,12 @@ void QQmlIncubator::clear()
i->clear();
}
+ bool guardOk = d->vmeGuard.isOK();
+
d->vme.reset();
d->vmeGuard.clear();
+ if (d->creator && guardOk)
+ d->creator->clear();
d->creator.reset(0);
Q_ASSERT(d->compiledData == 0);