From 94ca5c73ccae65f8fe25b326fcf479eeed632bdd Mon Sep 17 00:00:00 2001 From: Axel Wagner Date: Wed, 26 Jan 2011 01:21:36 +0100 Subject: [PATCH] Bugfix: Test for outputs == NULL --- i3bar/src/workspaces.c | 3 +++ 1 file changed, 3 insertions(+) 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);