diff --git a/i3bar/src/workspaces.c b/i3bar/src/workspaces.c index 1e47bb81..a28ed2be 100644 --- a/i3bar/src/workspaces.c +++ b/i3bar/src/workspaces.c @@ -255,6 +255,9 @@ void parse_workspaces_json(char *json) { */ void free_workspaces() { i3_output *outputs_walk; + if (outputs == NULL) { + return; + } SLIST_FOREACH(outputs_walk, outputs, slist) { if (outputs_walk->workspaces != NULL && !TAILQ_EMPTY(outputs_walk->workspaces)) { FREE_TAILQ(outputs_walk->workspaces, i3_ws);