projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
f98063b
)
src/pitch/pitch.c: return NULL if pitch_mode is NULL
author
Paul Brossier
<piem@piem.org>
Wed, 8 Feb 2017 10:58:16 +0000
(11:58 +0100)
committer
Paul Brossier
<piem@piem.org>
Wed, 8 Feb 2017 10:58:16 +0000
(11:58 +0100)
src/pitch/pitch.c
patch
|
blob
|
history
diff --git
a/src/pitch/pitch.c
b/src/pitch/pitch.c
index
e091871
..
9febb36
100644
(file)
--- a/
src/pitch/pitch.c
+++ b/
src/pitch/pitch.c
@@
-111,6
+111,10
@@
new_aubio_pitch (const char_t * pitch_mode,
{
aubio_pitch_t *p = AUBIO_NEW (aubio_pitch_t);
aubio_pitch_type pitch_type;
+ if (pitch_mode == NULL) {
+ AUBIO_ERR ("pitch: can not use ‘NULL‘ for pitch detection method\n");
+ goto beach;
+ }
if (strcmp (pitch_mode, "mcomb") == 0)
pitch_type = aubio_pitcht_mcomb;
else if (strcmp (pitch_mode, "yinfft") == 0)