From 304f64a9ba45c0965e0f3ef270fd8ee273c967ea Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 6 Aug 2025 15:05:16 -0600 Subject: [PATCH] Selection::clear_time() should follow the same pattern as Selection::clear_* i.e. only do something if there was an existing time selection. This also fixes an early-use-bug-crash for _superclock_ticks_per_second --- gtk2_ardour/selection.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gtk2_ardour/selection.cc b/gtk2_ardour/selection.cc index 17c1e72897..fdc00632bb 100644 --- a/gtk2_ardour/selection.cc +++ b/gtk2_ardour/selection.cc @@ -140,9 +140,12 @@ Selection::clear_objects (bool with_signal) void Selection::clear_time (bool with_signal) { - time.clear(); - if (with_signal) { - TimeChanged (); + if (!time.empty()) { + time.clear(); + + if (with_signal) { + TimeChanged (); + } } }