[py] fix typo in sink docstrings
[aubio.git] / python / ext / py-sink.c
index f274776..83c7ddd 100644 (file)
@@ -81,7 +81,7 @@ static char Py_sink_close_doc[] = ""
 "Close this sink now.\n"
 "\n"
 "By default, the sink will be closed before being deleted.\n"
-"Explicitely closing a sink can be useful to control the number\n"
+"Explicitly closing a sink can be useful to control the number\n"
 "of files simultaneously opened.\n"
 "";
 
@@ -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);
   }