QmlDesigner.NodeInstances: Workaround for property cache

The property cache in the engine is causing a crash if entry is destroyed.

Change-Id: I8bb058b3ae7c8f0c65f1b8f07676ed128e4789d3
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
Marco Bubke
2012-12-04 19:10:17 +01:00
parent 3f7413fd03
commit 0b3eb65fc9

View File

@@ -198,7 +198,9 @@ NodeInstanceMetaObject::NodeInstanceMetaObject(const ObjectNodeInstancePointer &
NodeInstanceMetaObject::~NodeInstanceMetaObject()
{
cache->release();
if (cache->count() > 1) // qml is chrashing because the property cache is not removed from the engine
cache->release();
else
m_type->release();
nodeInstanceMetaObjectList.remove(this);