Commit 09af2cf9 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner: crashfix

Check if object is not 0 and we are not called back from the
destructor.
parent 6d229ef6
......@@ -782,7 +782,9 @@ QObject* ObjectNodeInstance::createObject(const NodeMetaInfo &metaInfo, QDeclara
QObject *ObjectNodeInstance::object() const
{
return m_object.data();
if (!m_object.isNull() && !QObjectPrivate::get(m_object.data())->wasDeleted)
return m_object.data();
return 0;
}
bool ObjectNodeInstance::hasContent() const
......
......@@ -178,7 +178,10 @@ QRectF QmlGraphicsItemNodeInstance::boundingRect() const
}
}
return qmlGraphicsItem()->boundingRect();
if (qmlGraphicsItem())
return qmlGraphicsItem()->boundingRect();
return QRectF();
}
//QVariant anchorLineFor(QDeclarativeItem *item, const AnchorLine &anchorLine)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment