From 73e402e49a4ff9ad97e669fc52a7a8f5abec61cf Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 12 Apr 2016 06:09:15 +1000 Subject: [PATCH] Fix missing NULL check could crash when windows were unmapped within a script. --- tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tree.c b/tree.c index 5d2b47c..10c3caa 100644 --- a/tree.c +++ b/tree.c @@ -1637,7 +1637,7 @@ bool set_layer(monitor_t *m, desktop_t *d, node_t *n, stack_layer_t l) bool set_state(monitor_t *m, desktop_t *d, node_t *n, client_state_t s) { - if (n == NULL || n->client->state == s) { + if (n == NULL || n->client == NULL || n->client->state == s) { return false; } -- 2.44.0