diff --git a/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp b/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp index 8740a3d7937..142127c6c28 100644 --- a/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp +++ b/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp @@ -331,6 +331,9 @@ ModelNode NavigatorTreeModel::modelNodeForIndex(const QModelIndex &index) const if (!index.isValid()) return ModelNode(); + if (!m_view->model()) + return ModelNode(); + return m_view->modelNodeForInternalId(index.internalId()); }