shithub: aubio

Download patch

ref: 8d4ffeb0efa5d26b790d67d985c720cbd3335f78
parent: fef012aa0cf7c5ada731d2cbf8d0578e3ce4dfd6
author: Paul Brossier <piem@piem.org>
date: Fri Dec 21 10:15:47 EST 2018

[source] del_aubio_source argument can be null

Most del_ methods in aubio do not check if their argument is NULL, but
del_aubio_source used to, so we keep it this way to avoid breaking
existing programs.

--- a/src/io/source.c
+++ b/src/io/source.c
@@ -139,7 +139,7 @@
 
 void del_aubio_source(aubio_source_t * s) {
   AUBIO_ASSERT(s);
-  if (s->s_del && s->source)
+  if (s && s->s_del && s->source)
     s->s_del((void *)s->source);
   AUBIO_FREE(s);
 }