QmlDesigner: Fix crash

Change-Id: Iaabc04e97fb7e06d462e7716be27a24471be2bd2
Reviewed-by: Aleksei German <aleksei.german@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Thomas Hartmann
2020-04-15 19:27:01 +02:00
parent 6579505b4b
commit f9fb5d7e88

View File

@@ -944,6 +944,9 @@ bool ModelNode::hasNodeListProperty(const PropertyName &name) const
static bool recursiveAncestor(const ModelNode &possibleAncestor, const ModelNode &node)
{
if (!node.isValid())
return false;
if (node.hasParentProperty()) {
if (node.parentProperty().parentModelNode() == possibleAncestor)
return true;