From a9f463c7d49a3b4727de8ca17aaa5ac7366baeab Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Fri, 21 Dec 2018 15:26:04 +0100 Subject: [PATCH] [py] check if filter was created before deleting it --- python/ext/py-filter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/ext/py-filter.c b/python/ext/py-filter.c index e10a8edd..861f8cd6 100644 --- a/python/ext/py-filter.c +++ b/python/ext/py-filter.c @@ -109,7 +109,8 @@ static void Py_filter_del (Py_filter * self) { Py_XDECREF(self->out); - del_aubio_filter (self->o); + if (self->o) + del_aubio_filter (self->o); Py_TYPE(self)->tp_free ((PyObject *) self); } -- 2.11.0