From 53f993be44ac34c3f17677cb432a366dec962824 Mon Sep 17 00:00:00 2001 From: Nicolas Noble Date: Sat, 18 May 2002 11:48:48 +0000 Subject: Fixing ALSA driver to not segfault when launching simon. It still isn't supported but it's better signaled now. BTW I think there is a bug somewhere since the close() method were called without beeing open()'d. Oh well... svn-id: r4347 --- sound/mididrv.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sound/mididrv.cpp') 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); } -- cgit v1.2.3