From a8461cfbb9c22d8b09cf9ed39871a8e95f1c19f5 Mon Sep 17 00:00:00 2001 From: Reginald Kennedy Date: Tue, 30 Apr 2013 02:44:23 +0800 Subject: [PATCH] Fix crash on maprequest when WM_CLASS name and/or instance isn't set. --- spectrwm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spectrwm.c b/spectrwm.c index 6945965..38883f6 100644 --- a/spectrwm.c +++ b/spectrwm.c @@ -8568,8 +8568,12 @@ maprequest(xcb_map_request_event_t *e) if (w == win || !w->mapped) continue; - if (!strcmp(w->ch.class_name, + if (w->ch.class_name && + win->ch.class_name && + !strcmp(w->ch.class_name, win->ch.class_name) && + w->ch.instance_name && + win->ch.instance_name && !strcmp(w->ch.instance_name, win->ch.instance_name)) break; -- 1.7.10.4