Client: Fix possible segfault when there is no autofree option (shame on me :o)

This commit is contained in:
Martin Duquesnoy
2010-06-06 23:40:55 +02:00
parent 12fc01b824
commit 470606af1b

View File

@@ -990,8 +990,8 @@ client_set_rules(Client *c)
XGetClassHint(dpy, c->win, &xch);
/* Auto free */
if((xch.res_name && strstr(conf.client.autofree, xch.res_name))
|| (xch.res_class && strstr(conf.client.autofree, xch.res_class)))
if(conf.client.autofree && ((xch.res_name && strstr(conf.client.autofree, xch.res_name))
|| (xch.res_class && strstr(conf.client.autofree, xch.res_class))))
c->flags |= FreeFlag;
/* Wanted tag */