diff options
author | Robin Gareus <robin@gareus.org> | 2019-04-03 03:35:13 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2019-04-03 03:35:13 +0200 |
commit | 925d25851d30615727b8e4d850bd06432b2ca1d0 (patch) | |
tree | 1cb7bfa4b2a26dc21d16d09d451ce218b66b5b75 /libs/surfaces | |
parent | 6f95dfdc319fa6952563f1a2ad2571a1c51b7da4 (diff) |
Fix OSC crash when there's no master bus
Diffstat (limited to 'libs/surfaces')
-rw-r--r-- | libs/surfaces/osc/osc.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/surfaces/osc/osc.cc b/libs/surfaces/osc/osc.cc index f5d72a24f3..7f8eba95cb 100644 --- a/libs/surfaces/osc/osc.cc +++ b/libs/surfaces/osc/osc.cc @@ -1224,7 +1224,7 @@ OSC::routes_list (lo_message msg) } else if (boost::dynamic_pointer_cast<Route>(s) && !boost::dynamic_pointer_cast<Track>(s)) { if (!(s->presentation_info().flags() & PresentationInfo::MidiBus)) { // r->feeds (session->master_out()) may make more sense - if (r->direct_feeds_according_to_reality (session->master_out())) { + if (session->master_out() && r->direct_feeds_according_to_reality (session->master_out())) { // this is a bus lo_message_add_string (reply, "B"); } else { @@ -6379,7 +6379,9 @@ OSC::get_sorted_stripables(std::bitset<32> types, bool cue, uint32_t custom, Sor if (!custom) { // Master/Monitor might be anywhere... we put them at the end - Sorry ;) if (types[5]) { - sorted.push_back (session->master_out()); + if (session->master_out()) { + sorted.push_back (session->master_out()); + } } if (types[6]) { if (session->monitor_out()) { |