QmlDesigner: Fix crash

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

Task-number: QDS-4382
Change-Id: I885f2b1b810d4ffd7b87749ca50e06cbdac3a7e2
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
This commit is contained in:
Thomas Hartmann
2021-05-20 13:50:41 +02:00
parent 4616c134aa
commit b32d03bf89

View File

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