QmlDesigner: Fix crash

If the view is not attached we should not access a nullptr.

Task-number: QDS-4382
Change-Id: I885f2b1b810d4ffd7b87749ca50e06cbdac3a7e2
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Thomas Hartmann
2021-05-20 13:50:41 +02:00
parent 6de05306d6
commit 3cb9d8d56d

View File

@@ -699,6 +699,7 @@ void AbstractView::setEnabled(bool b)
QList<ModelNode> AbstractView::allModelNodes() const
{
QTC_ASSERT(model(), return {});
return toModelNodeList(model()->d->allNodes());
}