changeset 1392:db56f6752bd1 trunk

[svn] amidi-plug alsa: check if a sequencer actually exists before requesting sequencer port list
author giacomo
date Mon, 10 Jul 2006 17:37:19 -0700
parents 38585aa7468c
children f8e301246b1b
files ChangeLog Plugins/Input/amidi-plug/backend-alsa/b-alsa.c
diffstat 2 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Jul 10 14:09:15 2006 -0700
+++ b/ChangeLog	Mon Jul 10 17:37:19 2006 -0700
@@ -1,3 +1,12 @@
+2006-07-10 21:09:15 +0000  William Pitcock <nenolod@nenolod.net>
+  revision [1696]
+  - update NEWS
+  
+
+  Changes:        Modified:
+  +10 -0          trunk/NEWS  
+
+
 2006-07-10 21:04:49 +0000  William Pitcock <nenolod@nenolod.net>
   revision [1694]
   - use default 'plugins' icon for now.
--- a/Plugins/Input/amidi-plug/backend-alsa/b-alsa.c	Mon Jul 10 14:09:15 2006 -0700
+++ b/Plugins/Input/amidi-plug/backend-alsa/b-alsa.c	Mon Jul 10 17:37:19 2006 -0700
@@ -467,8 +467,11 @@
    bpointer[0] = (not used) , bpointer[1] = (not used) */
 GSList * sequencer_port_get_list( void )
 {
+  gint err;
   snd_seq_t * pseq;
-  snd_seq_open( &pseq , "default" , SND_SEQ_OPEN_DUPLEX , 0 );
+  err = snd_seq_open( &pseq , "default" , SND_SEQ_OPEN_DUPLEX , 0 );
+  if ( err < 0 )
+    return NULL;
 
   GSList * wports = NULL;
   snd_seq_client_info_t *cinfo;