From: Paul Brossier Date: Fri, 21 Dec 2018 14:25:43 +0000 (+0100) Subject: [sink] del_aubio_sink argument can be null X-Git-Tag: 0.4.9~37 X-Git-Url: https://git.aubio.org/?p=aubio.git;a=commitdiff_plain;h=2bfbf3364f1912a2409e18e54dee361571234b00 [sink] del_aubio_sink argument can be null Most del_ methods in aubio do not check if their argument is NULL, but del_aubio_sink used to, so we keep it this way to avoid breaking existing programs. --- diff --git a/src/io/sink.c b/src/io/sink.c index f8ac5fdd..f3f56a32 100644 --- a/src/io/sink.c +++ b/src/io/sink.c @@ -136,7 +136,7 @@ uint_t aubio_sink_close(aubio_sink_t *s) { void del_aubio_sink(aubio_sink_t * s) { AUBIO_ASSERT(s); - if (s->s_del && s->sink) + if (s && s->s_del && s->sink) s->s_del((void *)s->sink); AUBIO_FREE(s); }