projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
48105ca
)
[py] check sink was created before calling del_aubio_sink
author
Paul Brossier
<piem@piem.org>
Fri, 21 Dec 2018 14:00:34 +0000
(15:00 +0100)
committer
Paul Brossier
<piem@piem.org>
Fri, 21 Dec 2018 14:00:34 +0000
(15:00 +0100)
python/ext/py-sink.c
patch
|
blob
|
history
diff --git
a/python/ext/py-sink.c
b/python/ext/py-sink.c
index
f274776
..
4fc514f
100644
(file)
--- a/
python/ext/py-sink.c
+++ b/
python/ext/py-sink.c
@@
-150,8
+150,10
@@
Py_sink_init (Py_sink * self, PyObject * args, PyObject * kwds)
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);
}