From: Paul Brossier Date: Fri, 21 Dec 2018 14:26:04 +0000 (+0100) Subject: [py] check if filter was created before deleting it X-Git-Tag: 0.4.9~36 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=a9f463c7d49a3b4727de8ca17aaa5ac7366baeab;p=aubio.git [py] check if filter was created before deleting it --- 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); }