Commit de187cb6 authored by Thomas Hartmann's avatar Thomas Hartmann

QmlDesigner.model: crash fix

Check if the node is really a PropertyChange

Reviewed-by: Marco Bubke
parent 70fd2c21
......@@ -60,7 +60,7 @@ QmlPropertyChanges QmlModelState::propertyChanges(const ModelNode &node)
addChangeSetIfNotExists(node);
foreach (const ModelNode &childNode, modelNode().nodeListProperty("changes").toModelNodeList()) {
//### exception if not valid QmlModelStateOperation
if (QmlPropertyChanges(childNode).target().isValid() && QmlPropertyChanges(childNode).target() == node)
if (QmlPropertyChanges(childNode).target().isValid() && QmlPropertyChanges(childNode).target() == node && QmlPropertyChanges(childNode).isValid())
return QmlPropertyChanges(childNode); //### exception if not valid(childNode);
}
return QmlPropertyChanges(); //not found
......
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