Fix missing NULL check

could crash when windows were unmapped within a script.
This commit is contained in:
Campbell Barton 2016-04-12 06:09:15 +10:00
parent 0042db16f4
commit 73e402e49a

2
tree.c
View file

@ -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) 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; return false;
} }