forked from qt-creator/qt-creator
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:
@@ -696,6 +696,7 @@ void AbstractView::setEnabled(bool b)
|
|||||||
|
|
||||||
QList<ModelNode> AbstractView::allModelNodes() const
|
QList<ModelNode> AbstractView::allModelNodes() const
|
||||||
{
|
{
|
||||||
|
QTC_ASSERT(model(), return {});
|
||||||
return toModelNodeList(model()->d->allNodes());
|
return toModelNodeList(model()->d->allNodes());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user