aboutsummaryrefslogtreecommitdiffstats
path: root/funcs/func_groupcount.c
diff options
context:
space:
mode:
Diffstat (limited to 'funcs/func_groupcount.c')
-rw-r--r--funcs/func_groupcount.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/funcs/func_groupcount.c b/funcs/func_groupcount.c
index ed96e34b0..d804e0c1d 100644
--- a/funcs/func_groupcount.c
+++ b/funcs/func_groupcount.c
@@ -157,6 +157,9 @@ static int group_list_function_read(struct ast_channel *chan, char *cmd,
char tmp1[1024] = "";
char tmp2[1024] = "";
+ if (!chan)
+ return -1;
+
headp = &chan->varshead;
AST_LIST_TRAVERSE(headp, current, entries) {
if (!strncmp(ast_var_name(current), GROUP_CATEGORY_PREFIX "_", strlen(GROUP_CATEGORY_PREFIX) + 1)) {