From 0cd18c09273ac5bfb4a883e745634b16a78ce8c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Mon, 8 Feb 2021 00:55:27 +0100 Subject: [PATCH] Fixed crash when there is no graph in the data --- src/GUI/gui.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/GUI/gui.cpp b/src/GUI/gui.cpp index 6ad95ed7..8427bd40 100644 --- a/src/GUI/gui.cpp +++ b/src/GUI/gui.cpp @@ -866,6 +866,8 @@ void GUI::loadData(const Data &data) paths = _mapView->loadData(data); GraphTab *gt = static_cast(_graphTabWidget->currentWidget()); + if (!gt) + return; int index = _graphTabWidget->currentIndex(); for (int i = 0; i < paths.count(); i++) {