diff --git a/funcs/func_groupcount.c b/funcs/func_groupcount.c index 281d9d0554..bb2bcf49c1 100644 --- a/funcs/func_groupcount.c +++ b/funcs/func_groupcount.c @@ -58,7 +58,8 @@ static int group_count_function_read(struct ast_channel *chan, char *cmd, } if (gi) { ast_copy_string(group, gi->group, sizeof(group)); - ast_copy_string(category, gi->category, sizeof(category)); + if (!ast_strlen_zero(gi->category)) + ast_copy_string(category, gi->category, sizeof(category)); } ast_app_group_list_unlock(); }