]> git.sur5r.net Git - i3/i3/commitdiff
Bugfix: Test for outputs == NULL
authorAxel Wagner <mail@merovius.de>
Wed, 26 Jan 2011 00:21:36 +0000 (01:21 +0100)
committerAxel Wagner <mail@merovius.de>
Wed, 26 Jan 2011 00:54:36 +0000 (01:54 +0100)
i3bar/src/workspaces.c

index 1e47bb8167b61feb03c4ac156015f5974f2037d4..a28ed2beb0fafa0d839e7f36cc8a237ab1bc993d 100644 (file)
@@ -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);