From 43e0f08b930b1891e5fcfa33a2d50956d8a8f235 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 2 Apr 2024 18:01:48 -0600 Subject: [PATCH] sfdb_ui should be smart if there's no auditioner --- gtk2_ardour/sfdb_ui.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/sfdb_ui.cc b/gtk2_ardour/sfdb_ui.cc index 9311bf1836..6f901a5987 100644 --- a/gtk2_ardour/sfdb_ui.cc +++ b/gtk2_ardour/sfdb_ui.cc @@ -286,8 +286,10 @@ SoundFileBox::set_session(Session* s) auditioner_connections.drop_connections(); } else { auditioner_connections.drop_connections(); - _session->AuditionActive.connect(auditioner_connections, invalidator (*this), boost::bind (&SoundFileBox::audition_active, this, _1), gui_context()); - _session->the_auditioner()->AuditionProgress.connect(auditioner_connections, invalidator (*this), boost::bind (&SoundFileBox::audition_progress, this, _1, _2), gui_context()); + if (_session->the_auditioner()) { + _session->AuditionActive.connect(auditioner_connections, invalidator (*this), boost::bind (&SoundFileBox::audition_active, this, _1), gui_context()); + _session->the_auditioner()->AuditionProgress.connect(auditioner_connections, invalidator (*this), boost::bind (&SoundFileBox::audition_progress, this, _1, _2), gui_context()); + } } }