Browse Source

cmMidiAlsa.c : cmMpFinalize() now checks for a NULL handle before call snd_seq_stop_queue().

master
Kevin Larke 10 years ago
parent
commit
7d0888f97d
1 changed files with 6 additions and 5 deletions
  1. 6
    5
      linux/cmMidiAlsa.c

+ 6
- 5
linux/cmMidiAlsa.c View File

@@ -561,11 +561,12 @@ cmMpRC_t cmMpFinalize()
561 561
     }
562 562
 
563 563
     // stop the queue
564
-    if((arc = snd_seq_stop_queue(p->h,p->alsa_queue, NULL)) < 0 )
565
-    {
566
-      rc = _cmMpErrMsg(&p->err,kSysErrMpRC,arc,"ALSA queue stop failed.");
567
-      goto errLabel;
568
-    }
564
+    if( p->h != NULL )
565
+      if((arc = snd_seq_stop_queue(p->h,p->alsa_queue, NULL)) < 0 )
566
+      {
567
+        rc = _cmMpErrMsg(&p->err,kSysErrMpRC,arc,"ALSA queue stop failed.");
568
+        goto errLabel;
569
+      }
569 570
 
570 571
     // release the alsa queue
571 572
     if( p->alsa_queue != -1 )

Loading…
Cancel
Save