From: Paul Brossier Date: Sat, 14 Jul 2012 19:14:27 +0000 (-0600) Subject: src/io/source_sndfile.c: avoid segfault when deleting NULL X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=420962ed06738620a3b4636b97c9b9a15e3d2fa6;p=aubio.git src/io/source_sndfile.c: avoid segfault when deleting NULL --- diff --git a/src/io/source_sndfile.c b/src/io/source_sndfile.c index 5dfa8166..aa857c2f 100644 --- a/src/io/source_sndfile.c +++ b/src/io/source_sndfile.c @@ -117,6 +117,7 @@ void aubio_source_sndfile_do(aubio_source_sndfile_t * s, fvec_t * read_data, uin } 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)); }