summaryrefslogtreecommitdiff
path: root/muse2/muse/driver/jackmidi.cpp
diff options
context:
space:
mode:
authorTim E. Real <termtech@rogers.com>2010-12-18 03:01:21 +0000
committerTim E. Real <termtech@rogers.com>2010-12-18 03:01:21 +0000
commite7cc0ca7479cd4bca09963a1d843ecbae15898eb (patch)
tree63cac33dd793a0fb3e9e3de6ee5f01d24f47e682 /muse2/muse/driver/jackmidi.cpp
parent72dd531044077595601cfaae63835e49f46ece15 (diff)
Fixed marker view crash. Fixed some memory leaks.
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();
}