]> git.alsa-project.org Git - alsa-tools.git/commitdiff
Fix the abort with MIDI control
authorTakashi Iwai <tiwai@suse.de>
Mon, 27 Dec 2004 14:54:42 +0000 (14:54 +0000)
committerTakashi Iwai <tiwai@suse.de>
Mon, 27 Dec 2004 14:54:42 +0000 (14:54 +0000)
From Dirk Jagdmann <doj@cubic.org>

Hello developers,

I just gave the latest CVS version of envy24control a try and had to add
this simple patch, so it would not abort upon program start immediately.

envy24control/midi.c

index c89ba1fd4ddad8bdfb6557dfd202ed5fc190f92e..29f9279c1c4d1afab8efa1aa4fb106d377da419f 100644 (file)
@@ -55,6 +55,7 @@ int midi_close()
 static void do_controller(int c, int v)
 {
   snd_seq_event_t ev;
+  if(!seq) return;
   snd_seq_ev_clear(&ev);
   snd_seq_ev_set_source(&ev, port);
   snd_seq_ev_set_subs(&ev);