diff options
Diffstat (limited to 'funcs/func_speex.c')
-rw-r--r-- | funcs/func_speex.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/funcs/func_speex.c b/funcs/func_speex.c index 7467c23bb..4e3c13b87 100644 --- a/funcs/func_speex.c +++ b/funcs/func_speex.c @@ -202,6 +202,11 @@ static int speex_write(struct ast_channel *chan, const char *cmd, char *data, co struct speex_direction_info **sdi = NULL; int is_new = 0; + if (!chan) { + ast_log(LOG_WARNING, "No channel was provided to %s function.\n", cmd); + return -1; + } + if (strcasecmp(data, "rx") && strcasecmp(data, "tx")) { ast_log(LOG_ERROR, "Invalid argument provided to the %s function\n", cmd); return -1; |