diff options
Diffstat (limited to 'apps/app_jack.c')
-rw-r--r-- | apps/app_jack.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/app_jack.c b/apps/app_jack.c index d1bdfa38f..f32c59ff0 100644 --- a/apps/app_jack.c +++ b/apps/app_jack.c @@ -951,6 +951,11 @@ static int jack_hook_write(struct ast_channel *chan, const char *cmd, char *data { int res; + if (!chan) { + ast_log(LOG_WARNING, "No channel was provided to %s function.\n", cmd); + return -1; + } + if (!strcasecmp(value, "on")) res = enable_jack_hook(chan, data); else if (!strcasecmp(value, "off")) |