From: Axel Wagner Date: Wed, 26 Jan 2011 00:21:36 +0000 (+0100) Subject: Bugfix: Test for outputs == NULL X-Git-Tag: 4.0.1~7^2~23 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=18e6caf0a9ed01a9637b4fbc8245960f377676d9;p=i3%2Fi3 Bugfix: Test for outputs == NULL --- 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);