From f4827b470b82b27fe63625cf0af047b4734c9eaf Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 11 Dec 2022 20:41:20 -0700 Subject: [PATCH] fix unnecessary error messages from time info box --- gtk2_ardour/audio_clock.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/audio_clock.cc b/gtk2_ardour/audio_clock.cc index 3ae42282f7..3a3afa5ac8 100644 --- a/gtk2_ardour/audio_clock.cc +++ b/gtk2_ardour/audio_clock.cc @@ -2246,7 +2246,11 @@ AudioClock::set_mode (Mode m) return; } - const timecnt_t existing_duration = is_duration ? current_duration () : timecnt_t (); + timecnt_t existing_duration; + + if (_session) { + existing_duration = current_duration (); + } _mode = m;