push2: fix a couple of potential crashes

This commit is contained in:
Paul Davis 2022-08-31 10:11:02 -06:00
parent 7b855f0cc5
commit 681ca38848
2 changed files with 7 additions and 1 deletions

View file

@ -543,7 +543,9 @@ CueLayout::show_running_boxen (bool yn)
}
boost::shared_ptr<TriggerBox> tb = _route[n]->triggerbox();
assert (tb);
if (!tb) {
continue;
}
if (yn) {

View file

@ -172,6 +172,10 @@ P2GUI::update_port_combos ()
std::vector<std::string> midi_inputs;
std::vector<std::string> midi_outputs;
if (!_p2.input_port() || !_p2.output_port()) {
return;
}
ARDOUR::AudioEngine::instance()->get_ports ("", ARDOUR::DataType::MIDI, ARDOUR::PortFlags (ARDOUR::IsOutput|ARDOUR::IsTerminal), midi_inputs);
ARDOUR::AudioEngine::instance()->get_ports ("", ARDOUR::DataType::MIDI, ARDOUR::PortFlags (ARDOUR::IsInput|ARDOUR::IsTerminal), midi_outputs);