aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlobjectcreator.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2014-02-27 13:06:10 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-02 17:11:28 +0100
commit52dc3f6937d51046424b232323189dfb41cc09c7 (patch)
treeb74c0e6bb30f7dcec9e599b88dd9b7637db7914c /src/qml/qml/qqmlobjectcreator.cpp
parent5c9a0f61c74724d571b56bdbac486594066ff5e8 (diff)
[new compiler] Fix tst_qqmlengine::trimComponentCache
Fix bug in QQmlCompiledData refcounting. Change-Id: I09528419c602d3173db2f13c516d2f0d79abd92e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlobjectcreator.cpp')
-rw-r--r--src/qml/qml/qqmlobjectcreator.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp
index 53689775c6..68d128d79a 100644
--- a/src/qml/qml/qqmlobjectcreator.cpp
+++ b/src/qml/qml/qqmlobjectcreator.cpp
@@ -200,6 +200,8 @@ QObject *QQmlObjectCreator::create(int subComponentIndex, QObject *parent)
if (instance) {
QQmlData *ddata = QQmlData::get(instance);
Q_ASSERT(ddata);
+ if (ddata->compiledData)
+ ddata->compiledData->release();
ddata->compiledData = compiledData;
ddata->compiledData->addref();