Fix: avoid crash when opening a project without a folio (diagram).

This commit is contained in:
Andre Rummler
2026-08-28 19:55:29 +02:00
parent 487b22f483
commit 0a98cce8de
+5 -1
View File
@@ -210,10 +210,14 @@ void ProjectView::changeFirstTab()
}
/**
@return first folio of current project
@return first folio of current project, or nullptr if the project
has no diagram.
*/
DiagramView *ProjectView::firstDiagram()
{
if (m_diagram_ids.isEmpty()) {
return(nullptr);
}
return(m_diagram_ids.first());
}