forked from qt-creator/qt-creator
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:
@@ -944,6 +944,9 @@ bool ModelNode::hasNodeListProperty(const PropertyName &name) const
|
|||||||
|
|
||||||
static bool recursiveAncestor(const ModelNode &possibleAncestor, const ModelNode &node)
|
static bool recursiveAncestor(const ModelNode &possibleAncestor, const ModelNode &node)
|
||||||
{
|
{
|
||||||
|
if (!node.isValid())
|
||||||
|
return false;
|
||||||
|
|
||||||
if (node.hasParentProperty()) {
|
if (node.hasParentProperty()) {
|
||||||
if (node.parentProperty().parentModelNode() == possibleAncestor)
|
if (node.parentProperty().parentModelNode() == possibleAncestor)
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user