OSC: fix crash when querying master-status on systems w/o metronome

This happens when master-feedback is enabled and /refresh message
is received and the metronme is disabled at compile-time
(eg. LiveTrax)
This commit is contained in:
Robin Gareus
2025-07-29 23:08:51 +02:00
parent d82861954d
commit 0742fd8563

View File

@@ -132,8 +132,10 @@ OSCGlobalObserver::OSCGlobalObserver (OSC& o, Session& s, ArdourSurface::OSC::OS
solo_active (session->soloing() || session->listening());
std::shared_ptr<Controllable> click_controllable = std::dynamic_pointer_cast<Controllable>(session->click_gain()->gain_control());
click_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::send_change_message, this, X_("/click/level"), click_controllable), OSC::instance());
send_change_message (X_("/click/level"), click_controllable);
if (click_controllable) {
click_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::send_change_message, this, X_("/click/level"), click_controllable), OSC::instance());
send_change_message (X_("/click/level"), click_controllable);
}
session->route_group_added.connect (session_connections, MISSING_INVALIDATOR, std::bind (static_cast<void (OSCGlobalObserver::*)(ARDOUR::RouteGroup*)>(&OSCGlobalObserver::group_changed), this, _1), OSC::instance());
session->route_group_removed.connect (session_connections, MISSING_INVALIDATOR, std::bind (static_cast<void (OSCGlobalObserver::*)(void)>(&OSCGlobalObserver::group_changed), this), OSC::instance());