From e77e3b35b83c33a65c3bbb0debd9c33927cf9ff5 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 9 Feb 2022 09:57:52 -0700 Subject: [PATCH] mackie: fix crash when using thread-local tempo map TempoMap::use() assumes the thread_local pointer has been set up. This is not the case for the control protocol event loop, so call ::fetch() instead which does not require this assumption (and sets the thread_local pointer too, though nothing else in the Mackie code uses it) --- libs/surfaces/mackie/mackie_control_protocol.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc index df11350f4e..b91d438dbd 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.cc +++ b/libs/surfaces/mackie/mackie_control_protocol.cc @@ -1,4 +1,4 @@ -/* +x1/* * Copyright (C) 2006-2007 John Anderson * Copyright (C) 2007-2010 David Robillard * Copyright (C) 2007-2017 Paul Davis @@ -1157,7 +1157,7 @@ MackieControlProtocol::format_bbt_timecode (samplepos_t now_sample) { Temporal::BBT_Time bbt_time; - bbt_time = Temporal::TempoMap::use()->bbt_at (timepos_t (now_sample)); + bbt_time = Temporal::TempoMap::fetch()->bbt_at (timepos_t (now_sample)); // The Mackie protocol spec is built around a BBT time display of //