Skip to content
Snippets Groups Projects
Commit bbb33e5c authored by Russell Bryant's avatar Russell Bryant
Browse files

don't crash if no group is specified (bug #4836)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6237 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 80af1153
No related branches found
No related tags found
No related merge requests found
......@@ -33,8 +33,10 @@ static char *group_count_function_read(struct ast_channel *chan, char *cmd, char
ast_app_group_split_group(data, group, sizeof(group), category, sizeof(category));
if (ast_strlen_zero(group)) {
grp = pbx_builtin_getvar_helper(chan, category);
ast_copy_string(group, grp, sizeof(group));
if ((grp = pbx_builtin_getvar_helper(chan, category)))
ast_copy_string(group, grp, sizeof(group));
else
return buf;
}
count = ast_app_group_get_count(group, category);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment