From 4a186874aa27dd970ae26ae0f662d448565c66e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Anger?= Date: Thu, 12 Apr 2012 13:39:37 +0200 Subject: [PATCH] fix crash --- src/client.c | 6 ++---- src/config.c | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/client.c b/src/client.c index 136bcca..9e0d14c 100644 --- a/src/client.c +++ b/src/client.c @@ -903,8 +903,7 @@ client_apply_rule(struct client *c) if(r->tag != -1) c->tag = tag_gb_id(c->screen, r->tag); - if (r->theme) - c->theme = r->theme; + c->theme = r->theme; /* free = false for originally free client */ if(r->flags & RULE_FREE) @@ -942,8 +941,7 @@ client_apply_rule(struct client *c) if(r->tag != -1) c->tag = tag_gb_id(c->screen, r->tag); - if (r->theme) - c->theme = r->theme; + c->theme = r->theme; /* free = false for originally free client */ if(r->flags & RULE_FREE) diff --git a/src/config.c b/src/config.c index 8802f74..8247266 100644 --- a/src/config.c +++ b/src/config.c @@ -285,7 +285,7 @@ config_rule(void) else r->theme = W->ctheme; - if (!strcmp(r->name, "default")) + if (r->name && !strcmp(r->name, "default")) { W->crule = r; }