Commit 6d1b0857 authored by Kai Koehne's avatar Kai Koehne
Browse files

QmlDesigner: Fix crash when deleting an item for a malformed qml file

This fixes a crash when editing a file where e.g. PropertyChanges had
an invalid target property.

Reviewed-by: Lasse Holmstedt
parent 98e8813c
......@@ -79,9 +79,13 @@ QList<QmlModelStateOperation> QmlModelState::stateOperations(const ModelNode &no
foreach (const ModelNode &childNode, modelNode().nodeListProperty("changes").toModelNodeList()) {
//### exception if not valid QmlModelStateOperation
if (QmlModelStateOperation(childNode).target() == node)
returnList.append(QmlModelStateOperation(childNode)); //### exception if not valid(childNode);
QmlModelStateOperation stateOperation(childNode);
if (stateOperation.isValid()) {
ModelNode targetNode =;
if (targetNode.isValid()
&& targetNode == node)
returnList.append(stateOperation); //### exception if not valid(childNode);
return returnList; //not found
Supports Markdown
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