forked from qt-creator/qt-creator
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user