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.
This commit is contained in:
Paul Davis 2019-11-08 12:39:58 -07:00
parent bd90499532
commit b79d47b1b5

View file

@ -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) {