From 0c448c387bf4fc11c1bc2494055303ed12a15208 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 8 Oct 2015 15:28:21 -0400 Subject: fix crash when switching from regular MIDI to ipMIDI Mackie surface --- libs/surfaces/mackie/surface.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libs') diff --git a/libs/surfaces/mackie/surface.cc b/libs/surfaces/mackie/surface.cc index 5551c5d0de..5ee2e81abd 100644 --- a/libs/surfaces/mackie/surface.cc +++ b/libs/surfaces/mackie/surface.cc @@ -150,6 +150,8 @@ Surface::~Surface () delete *it; } + port_connection.disconnect (); + delete _jog_wheel; delete _port; @@ -159,6 +161,10 @@ Surface::~Surface () void Surface::connection_handler (boost::weak_ptr, std::string name1, boost::weak_ptr, std::string name2, bool yn) { + if (!_port) { + return; + } + string ni = ARDOUR::AudioEngine::instance()->make_port_name_non_relative (_port->input_name()); string no = ARDOUR::AudioEngine::instance()->make_port_name_non_relative (_port->output_name()); -- cgit v1.2.3