aboutsummaryrefslogtreecommitdiff
path: root/sound/mididrv.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sound/mididrv.cpp')
-rw-r--r--sound/mididrv.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/mididrv.cpp b/sound/mididrv.cpp
index e4155f0d25..f2aa0a43f8 100644
--- a/sound/mididrv.cpp
+++ b/sound/mididrv.cpp
@@ -1581,8 +1581,9 @@ int MidiDriver_ALSA::open(int mode) {
}
void MidiDriver_ALSA::close() {
- _mode = 0;
- snd_seq_close(seq_handle);
+ _mode = 0;
+ if (seq_handle)
+ snd_seq_close(seq_handle);
}