From 226ff63e3c230765bfcf4bc2e6f78e192222109f Mon Sep 17 00:00:00 2001 From: Mads Kiilerich Date: Sun, 11 Jun 2023 14:51:45 +0200 Subject: [PATCH] temporal: avoid using superclock in Editor::initialize_canvas before creating the session cb78043adc "Indicate selection extents in time ruler" introduced use of superclock before it has been set. But as it only is used at time 0, the actual superclock doesn't matter. Still, we work around it in order to avoid triggering any warnings of uninitialized use. --- gtk2_ardour/marker.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk2_ardour/marker.cc b/gtk2_ardour/marker.cc index f14e279a50..0ca84642df 100644 --- a/gtk2_ardour/marker.cc +++ b/gtk2_ardour/marker.cc @@ -298,7 +298,7 @@ ArdourMarker::ArdourMarker (PublicEditor& ed, ArdourCanvas::Item& parent, std::s } _position = pos; - unit_position = editor.sample_to_pixel (pos.samples()); + unit_position = editor.sample_to_pixel (pos.is_zero () ? 0 : pos.samples()); unit_position -= _shift; group = new ArdourCanvas::Container (&parent, ArdourCanvas::Duple (unit_position, 1));