shithub: aubio

Download patch

ref: 420962ed06738620a3b4636b97c9b9a15e3d2fa6
parent: 2c3d4ca499ac72775c9ce04c0be286ee1bf2bbe3
author: Paul Brossier <piem@piem.org>
date: Sat Jul 14 09:14:27 EDT 2012

src/io/source_sndfile.c: avoid segfault when deleting NULL

--- a/src/io/source_sndfile.c
+++ b/src/io/source_sndfile.c
@@ -117,6 +117,7 @@
 }
 
 void del_aubio_source_sndfile(aubio_source_sndfile_t * s){
+  if (!s) return;
   if (sf_close(s->handle)) {
     AUBIO_ERR("Error closing file %s: %s", s->path, sf_strerror (NULL));
   }