diff options
Diffstat (limited to 'src/declarative/graphicsitems/qmlgraphicsloader.cpp')
-rw-r--r-- | src/declarative/graphicsitems/qmlgraphicsloader.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicsloader.cpp b/src/declarative/graphicsitems/qmlgraphicsloader.cpp index 86239cf..bb1020c 100644 --- a/src/declarative/graphicsitems/qmlgraphicsloader.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsloader.cpp @@ -263,6 +263,7 @@ void QmlGraphicsLoaderPrivate::_q_sourceLoaded() QObject *obj = component->create(ctxt); if (obj) { + ctxt->setParent(obj); item = qobject_cast<QmlGraphicsItem *>(obj); if (item) { item->setParentItem(q); @@ -271,6 +272,7 @@ void QmlGraphicsLoaderPrivate::_q_sourceLoaded() } } else { delete obj; + delete ctxt; source = QUrl(); } emit q->sourceChanged(); |