diff options
Diffstat (limited to 'main/app.c')
-rw-r--r-- | main/app.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/main/app.c b/main/app.c index c37279658..3d2fa52c3 100644 --- a/main/app.c +++ b/main/app.c @@ -721,6 +721,9 @@ int ast_control_streamfile(struct ast_channel *chan, const char *file, long pause_restart_point = 0; long offset = 0; + if (!file) { + return -1; + } if (offsetms) { offset = *offsetms * 8; /* XXX Assumes 8kHz */ } @@ -752,12 +755,10 @@ int ast_control_streamfile(struct ast_channel *chan, const char *file, res = ast_answer(chan); } - if (file) { - if ((end = strchr(file, ':'))) { - if (!strcasecmp(end, ":end")) { - *end = '\0'; - end++; - } + if ((end = strchr(file, ':'))) { + if (!strcasecmp(end, ":end")) { + *end = '\0'; + end++; } } |