Showing the changes to python/ext (1 of 1 file). Show all
Unified · Split
| @@ -51,9 +51,11 @@ Py_fft_init (Py_fft * self, PyObject * args, PyObject * kwds) · 50 unmodified lines | |||
| 51 | { | 51 | { |
| 52 | self->o = new_aubio_fft (self->win_s); | 52 | self->o = new_aubio_fft (self->win_s); |
| 53 | if (self->o == NULL) { | 53 | if (self->o == NULL) { |
| 54 | char_t errstr[30]; | 54 | PyErr_Format(PyExc_RuntimeError, |
| 55 | sprintf(errstr, "error creating fft with win_s=%d", self->win_s); | 55 | "error creating fft with win_s=%d " |
| 56 | PyErr_SetString (PyExc_Exception, errstr); | 56 | "(should be a power of 2 greater than 1; " |
| 57 | "try recompiling aubio with --enable-fftw3)", | ||
| 58 | self->win_s); | ||
| 57 | return -1; | 59 | return -1; |
| 58 | } | 60 | } |
| 59 | 61 | ||
| @@ -68,7 +70,9 @@ Py_fft_del (Py_fft *self, PyObject *unused) · 8 unmodified lines | |||
| 68 | { | 70 | { |
| 69 | Py_XDECREF(self->doout); | 71 | Py_XDECREF(self->doout); |
| 70 | Py_XDECREF(self->rdoout); | 72 | Py_XDECREF(self->rdoout); |
| 71 | del_aubio_fft(self->o); | 73 | if (self->o) { |
| 74 | del_aubio_fft(self->o); | ||
| 75 | } | ||
| 72 | Py_TYPE(self)->tp_free((PyObject *) self); | 76 | Py_TYPE(self)->tp_free((PyObject *) self); |
| 73 | } | 77 | } |
| 74 | 78 | ||