diff options
Diffstat (limited to 'funcs/func_pitchshift.c')
-rw-r--r-- | funcs/func_pitchshift.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/funcs/func_pitchshift.c b/funcs/func_pitchshift.c index ca441f985..e5091d95d 100644 --- a/funcs/func_pitchshift.c +++ b/funcs/func_pitchshift.c @@ -200,6 +200,11 @@ static int pitchshift_helper(struct ast_channel *chan, const char *cmd, char *da int new = 0; float amount = 0; + if (!chan) { + ast_log(LOG_WARNING, "No channel was provided to %s function.\n", cmd); + return -1; + } + ast_channel_lock(chan); if (!(datastore = ast_channel_datastore_find(chan, &pitchshift_datastore, NULL))) { ast_channel_unlock(chan); |