summaryrefslogtreecommitdiff
path: root/gtk2_ardour/ardour_ui.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2019-11-08 12:39:58 -0700
committerPaul Davis <paul@linuxaudiosystems.com>2019-11-08 12:40:26 -0700
commitb79d47b1b540f77b63a72a09f520388afe4a707f (patch)
treef1eac0506e5374d645f4c26edf69ea9ab42b6d30 /gtk2_ardour/ardour_ui.cc
parentbd90499532d7e4410649e4c4153b5092c1c721f3 (diff)
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.
Diffstat (limited to 'gtk2_ardour/ardour_ui.cc')
-rw-r--r--gtk2_ardour/ardour_ui.cc5
1 files changed, 5 insertions, 0 deletions
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<AudioClock*>::iterator x = AudioClock::clocks.begin(); x != AudioClock::clocks.end(); ++x) {