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~3^2~38 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=94ca5c73ccae65f8fe25b326fcf479eeed632bdd;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);