summaryrefslogtreecommitdiff
path: root/muse2/muse/driver/jackmidi.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'muse2/muse/driver/jackmidi.cpp')
-rw-r--r--muse2/muse/driver/jackmidi.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/muse2/muse/driver/jackmidi.cpp b/muse2/muse/driver/jackmidi.cpp
index 03c75ef4..d401c7e1 100644
--- a/muse2/muse/driver/jackmidi.cpp
+++ b/muse2/muse/driver/jackmidi.cpp
@@ -167,10 +167,14 @@ MidiJackDevice::~MidiJackDevice()
//if(_client_jackport)
// audioDevice->unregisterPort(_client_jackport);
// p3.3.55
- if(_in_client_jackport)
- audioDevice->unregisterPort(_in_client_jackport);
- if(_out_client_jackport)
- audioDevice->unregisterPort(_out_client_jackport);
+
+ if(audioDevice)
+ {
+ if(_in_client_jackport)
+ audioDevice->unregisterPort(_in_client_jackport);
+ if(_out_client_jackport)
+ audioDevice->unregisterPort(_out_client_jackport);
+ }
//close();
}