From 8d4ffeb0efa5d26b790d67d985c720cbd3335f78 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Fri, 21 Dec 2018 15:15:47 +0100 Subject: [PATCH] [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. --- src/io/source.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.11.0