From f129cf4485bb3f3e20d346d4ddde8913534bcade Mon Sep 17 00:00:00 2001 From: Mads Kiilerich Date: Fri, 4 Nov 2022 16:34:58 +0100 Subject: [PATCH] AudioClock: use str parameter instead of accessing widget directly --- gtk2_ardour/audio_clock.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/audio_clock.cc b/gtk2_ardour/audio_clock.cc index 52b388c780..0e189f5c88 100644 --- a/gtk2_ardour/audio_clock.cc +++ b/gtk2_ardour/audio_clock.cc @@ -2022,13 +2022,13 @@ AudioClock::bbt_validate_edit (string & str) } bool -AudioClock::timecode_validate_edit (const string&) +AudioClock::timecode_validate_edit (const string& str) { Timecode::Time TC; int hours; char ignored[2]; - if (sscanf (_layout->get_text().c_str(), "%[- _]%" PRId32 ":%" PRId32 ":%" PRId32 "%[:;]%" PRId32, + if (sscanf (str.c_str(), "%[- _]%" PRId32 ":%" PRId32 ":%" PRId32 "%[:;]%" PRId32, ignored, &hours, &TC.minutes, &TC.seconds, ignored, &TC.frames) != 6) { return false; }