diff options
Diffstat (limited to 'apps/app_directory.c')
-rwxr-xr-x | apps/app_directory.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/app_directory.c b/apps/app_directory.c index 868badb02..00c19be64 100755 --- a/apps/app_directory.c +++ b/apps/app_directory.c @@ -130,6 +130,10 @@ static int do_directory(struct ast_channel *chan, struct ast_config *cfg, char * int found=0; char *start, *pos, *conv,*stringp=NULL; char fn[256]; + if (!context || !strlen(context)) { + ast_log(LOG_WARNING, "Directory must be called with an argument (context in which to interpret extensions)\n"); + return -1; + } memset(ext, 0, sizeof(ext)); ext[0] = digit; res = 0; |