QmlDesigner: Fix crash in tests

This is a behaivour change and the crash seemes to be never
triggered by application code.

Change-Id: I25d986139c47fd1acd0989220942e6e7ec69ef5d
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
Thomas Hartmann
2016-05-26 18:03:19 +02:00
parent 568e80b591
commit ea19d8b56b

View File

@@ -336,7 +336,7 @@ void ModelNode::setParentProperty(NodeAbstractProperty parent)
throw InvalidModelNodeException(__LINE__, __FUNCTION__, __FILE__);
}
if (parent == parentProperty())
if (hasParentProperty() && parent == parentProperty())
return;
parent.reparentHere(*this);