From 6e96ad04e1056ac3b90a1c0be69f3a3fe66d3e54 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 2 Apr 2024 17:59:20 -0600 Subject: [PATCH] no crash if instrument selector has no _instrument_list --- gtk2_ardour/instrument_selector.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/instrument_selector.cc b/gtk2_ardour/instrument_selector.cc index 7cf04d604f..35bd1635bb 100644 --- a/gtk2_ardour/instrument_selector.cc +++ b/gtk2_ardour/instrument_selector.cc @@ -19,7 +19,9 @@ #include "pbd/convert.h" #include "pbd/enumwriter.h" +#include "ardour/profile.h" #include "ardour/plugin_manager.h" + #include "gtkmm2ext/gui_thread.h" #include "instrument_selector.h" @@ -47,12 +49,20 @@ InstrumentSelector::drop_plugin_ptr() { unset_model (); clear (); - _instrument_list->clear (); + if (_instrument_list) { + _instrument_list->clear (); + } } void InstrumentSelector::refill() { + /* XXX conditional can be removed once livetrax has its own simple add + tracks dialog. + */ + if (Profile->get_livetrax()) { + return; + } TreeModel::iterator iter = get_active(); std::string selected; if (iter) {