shithub: aubio

Download patch

ref: 98d7aaa3b399e2bf7479cf50458193e1d046c547
parent: 48105cabe134711e7a25e063e135fa06c8d8a6df
author: Paul Brossier <piem@piem.org>
date: Fri Dec 21 10:00:34 EST 2018

[py] check sink was created before calling del_aubio_sink

--- a/python/ext/py-sink.c
+++ b/python/ext/py-sink.c
@@ -150,8 +150,10 @@
 static void
 Py_sink_del (Py_sink *self, PyObject *unused)
 {
-  del_aubio_sink(self->o);
-  free(self->mwrite_data.data);
+  if (self->o) {
+    del_aubio_sink(self->o);
+    free(self->mwrite_data.data);
+  }
   if (self->uri) {
     free(self->uri);
   }