Bugfix: Test for outputs == NULL

This commit is contained in:
Axel Wagner 2011-01-26 01:21:36 +01:00
parent 2064df9e5d
commit 18e6caf0a9
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);