From 4a977924049edf96fd736e4e84df059d20fb877a Mon Sep 17 00:00:00 2001 From: Nikolaus Gullotta Date: Wed, 5 Jun 2019 11:38:17 -0500 Subject: [PATCH] skip special routes for now and fix crash where bailing out of the dialog early would cause a ptr to stay around --- gtk2_ardour/mixer_snapshot_substitution_dialog.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gtk2_ardour/mixer_snapshot_substitution_dialog.cc b/gtk2_ardour/mixer_snapshot_substitution_dialog.cc index 8c71b1bbd9..32760210f1 100644 --- a/gtk2_ardour/mixer_snapshot_substitution_dialog.cc +++ b/gtk2_ardour/mixer_snapshot_substitution_dialog.cc @@ -53,6 +53,11 @@ MixerSnapshotSubstitutionDialog::MixerSnapshotSubstitutionDialog(MixerSnapshot* for(RouteList::const_iterator it = rl.begin(); it != rl.end(); it++) { boost::shared_ptr route = (*it); + if(route->is_monitor() || route->is_master() || route->is_auditioner()) { + //skip for now + continue; + } + if(route) { ComboBoxText* combo = manage(new ComboBoxText()); fill_combo_box(combo, route->name()); @@ -90,6 +95,7 @@ void MixerSnapshotSubstitutionDialog::fill_combo_box(ComboBoxText* box, const st for(vector::iterator i = routes.begin(); i != routes.end(); i++) { string state_name = (*i).name; + box->append(state_name); if(state_name == route_name) { box->set_active_text(state_name); @@ -100,6 +106,7 @@ void MixerSnapshotSubstitutionDialog::fill_combo_box(ComboBoxText* box, const st void MixerSnapshotSubstitutionDialog::on_response(int r) { if(r == RESPONSE_CANCEL) { + substitutions.clear(); close_self(); return; }