Commit 0200927d authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.nodeInstances: crash fix for QmlPuppet

We have to check if the instance is valid.
parent ec65b525
...@@ -1157,6 +1157,7 @@ void NodeInstanceServer::findItemChangesAndSendChangeCommands() ...@@ -1157,6 +1157,7 @@ void NodeInstanceServer::findItemChangesAndSendChangeCommands()
const ServerNodeInstance instance = property.first; const ServerNodeInstance instance = property.first;
const QString propertyName = property.second; const QString propertyName = property.second;
if (instance.isValid()) {
if (instance.isRootNodeInstance() && (propertyName == "width" || propertyName == "height")) if (instance.isRootNodeInstance() && (propertyName == "width" || propertyName == "height"))
adjustSceneRect = true; adjustSceneRect = true;
...@@ -1166,7 +1167,8 @@ void NodeInstanceServer::findItemChangesAndSendChangeCommands() ...@@ -1166,7 +1167,8 @@ void NodeInstanceServer::findItemChangesAndSendChangeCommands()
if (propertyName == "parent") { if (propertyName == "parent") {
informationChangedInstanceSet.insert(instance); informationChangedInstanceSet.insert(instance);
parentChangedSet.insert(instance); parentChangedSet.insert(instance);
} else { }
propertyChangedList.append(property); propertyChangedList.append(property);
} }
} }
......
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