shithub: aubio

Download patch

ref: 25f280f347868fc0f4ecdcb0b45d5a9400f8f772
parent: e8fcc9a9526fa67b11c795e14a2efb375addc3fe
author: Paul Brossier <piem@piem.org>
date: Mon Aug 6 10:03:48 EDT 2018

src/notes/notes.c: bail out if pitch creation failed (see #188)

--- a/src/notes/notes.c
+++ b/src/notes/notes.c
@@ -83,6 +83,7 @@
   o->onset_output = new_fvec (1);
 
   o->pitch = new_aubio_pitch (pitch_method, o->pitch_buf_size, o->hop_size, o->samplerate);
+  if (o->pitch == NULL) goto fail;
   if (o->pitch_tolerance != 0.) aubio_pitch_set_tolerance (o->pitch, o->pitch_tolerance);
   aubio_pitch_set_unit (o->pitch, "midi");
   o->pitch_output = new_fvec (1);