From fafe446dfe07606100d055395360513ed4eb4ecd Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Wed, 1 Jun 2011 15:11:34 +0200 Subject: [PATCH] Fix crash for prematurely deleted QSGItemPrivate::itemNodeInstance The OwnedByParent flag was set whereas it should had been cleared right after creating QSGItemPrivate::itemNodeInstance. Reviewed-by: Kim --- src/declarative/items/qsgitem_p.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/declarative/items/qsgitem_p.h b/src/declarative/items/qsgitem_p.h index c76eceb..0f4a321 100644 --- a/src/declarative/items/qsgitem_p.h +++ b/src/declarative/items/qsgitem_p.h @@ -670,6 +670,7 @@ QSGTransformNode *QSGItemPrivate::itemNode() { if (!itemNodeInstance) { itemNodeInstance = createTransformNode(); + itemNodeInstance->setFlag(QSGNode::OwnedByParent, false); #ifdef QML_RUNTIME_TESTING Q_Q(QSGItem); itemNodeInstance->description = QString::fromLatin1("QSGItem(%1)").arg(QString::fromLatin1(q->metaObject()->className())); -- 2.7.4