Bugfix: Test for outputs == NULL

This commit is contained in:
Axel Wagner 2011-01-26 01:21:36 +01:00
parent c9ee3eb21e
commit 94ca5c73cc
1 changed files with 3 additions and 0 deletions

View 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);