aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlcomponent.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-10-15 13:58:52 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-15 14:00:57 +0200
commitf82ba75a3062cb2098ea88ea928d7236e3aaaa03 (patch)
treeb32a8cfc5efd896764f51e4820d7dadfff0cefeb /src/qml/qml/qqmlcomponent.cpp
parent5302fea533f68abbe91ffc32ec732c11c8eef7ee (diff)
Make QQmlIncubatorPrivate refcounted
This fixes possible bugs and crashes where the incubator could get deleted through GC while constructing the component. Change-Id: Ibe0c5d4e172f0b5505ace0c3ea0369169b8b48a5 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlcomponent.cpp')
-rw-r--r--src/qml/qml/qqmlcomponent.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp
index e0360b67cb..6d194a6ba8 100644
--- a/src/qml/qml/qqmlcomponent.cpp
+++ b/src/qml/qml/qqmlcomponent.cpp
@@ -1094,7 +1094,7 @@ void QQmlComponent::create(QQmlIncubator &incubator, QQmlContext *context,
}
incubator.clear();
- QQmlIncubatorPrivate *p = incubator.d;
+ QExplicitlySharedDataPointer<QQmlIncubatorPrivate> p(incubator.d);
QQmlEnginePrivate *enginePriv = QQmlEnginePrivate::get(d->engine);