Crash when opening planner in empty log
Berthold Stoeger
bstoeger at mail.tuwien.ac.at
Fri Oct 28 14:35:35 PDT 2022
Hi Robert,
On Freitag, 28. Oktober 2022 22:56:33 CEST Robert Helling via subsurface
wrote:
> just noticed: Current master crashes with memory violation when opening the
> planner on an empty log.
I have a suspicion. Could you try if this fixes the problem:
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp
index 2aeafeace..c8448aa6e 100644
--- a/desktop-widgets/mainwindow.cpp
+++ b/desktop-widgets/mainwindow.cpp
@@ -660,6 +660,7 @@ void MainWindow::on_actionReplanDive_triggered()
setApplicationState(ApplicationState::PlanDive);
disableShortcuts(true);
+ clear_dive(&displayed_dive);
profile->setPlanState(&displayed_dive, 0);
plannerWidgets->replanDive();
}
@@ -673,6 +674,7 @@ void MainWindow::on_actionDivePlanner_triggered()
setApplicationState(ApplicationState::PlanDive);
disableShortcuts(true);
+ clear_dive(&displayed_dive);
profile->setPlanState(&displayed_dive, 0);
plannerWidgets->planDive();
}
Thank you,
Berthold
More information about the subsurface
mailing list