diff -r 49bc645df8b7 -r 1cc365c34125 ui/common/context.c --- a/ui/common/context.c Wed Jan 27 20:55:37 2016 +0100 +++ b/ui/common/context.c Fri Jan 29 18:48:56 2016 +0100 @@ -432,6 +432,10 @@ } int* ui_active_groups(UiContext *ctx, int *ngroups) { + if(!ctx->groups) { + return NULL; + } + int nelm = ucx_list_size(ctx->groups); int *groups = calloc(sizeof(int), nelm); @@ -470,7 +474,9 @@ ui_set_enabled(gw->widget, enable); } - free(groups); + if(groups) { + free(groups); + } } void uic_add_group_widget(UiContext *ctx, void *widget, UcxList *groups) {