Commit fff4c2b2 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner: avoid crash

There can be notifications from the instance
after a model node has been deleted.
We now ignore those.
parent 09af2cf9
......@@ -79,7 +79,7 @@ int NodeInstanceSignalSpy::qt_metacall(QMetaObject::Call call, int methodId, voi
if (call == QMetaObject::InvokeMetaMethod && methodId > QObject::staticMetaObject.methodCount()) {
ObjectNodeInstance::Pointer nodeInstance = m_objectNodeInstance.toStrongRef();
if (nodeInstance && nodeInstance->nodeInstanceView()) {
if (nodeInstance && nodeInstance->nodeInstanceView() && nodeInstance->modelNode().isValid()) {
nodeInstance->nodeInstanceView()->notifyPropertyChange(nodeInstance->modelNode(), m_indexPropertyHash.value(methodId));
}
......
......@@ -568,6 +568,8 @@ void NodeInstanceView::notifyPropertyChange(const ModelNode &node, const QString
{
if (m_blockStatePropertyChanges)
return;
if (!node.isValid())
return;
emitInstancePropertyChange(QList<QPair<ModelNode, QString> >() << qMakePair(node, propertyName));
}
......
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