From: Paul Brossier Date: Fri, 21 Dec 2018 14:15:47 +0000 (+0100) Subject: [source] del_aubio_source argument can be null X-Git-Tag: 0.4.9~38 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=8d4ffeb0efa5d26b790d67d985c720cbd3335f78;p=aubio.git [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. --- diff --git a/src/io/source.c b/src/io/source.c index 5a2e4938..c3ab7c95 100644 --- a/src/io/source.c +++ b/src/io/source.c @@ -139,7 +139,7 @@ uint_t aubio_source_close(aubio_source_t * s) { 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); }