From b79d47b1b540f77b63a72a09f520388afe4a707f Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 8 Nov 2019 12:39:58 -0700 Subject: [PATCH] fix crash caused by storing clock modes while loading a session The store would delete any existing node of the same name, which was the node being used to set the mode in the first place. --- gtk2_ardour/ardour_ui.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index e9000560c3..8f29f7b8e9 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -2840,6 +2840,11 @@ what you would like to do.\n"), PROGRAM_NAME)); void ARDOUR_UI::store_clock_modes () { + if (session_load_in_progress) { + /* Do not overwrite clock modes while loading them (with a session) */ + return; + } + XMLNode* node = new XMLNode(X_("ClockModes")); for (vector::iterator x = AudioClock::clocks.begin(); x != AudioClock::clocks.end(); ++x) {