]> code.delx.au - spectrwm/commitdiff
Fix crash on maprequest when WM_CLASS name and/or instance isn't set.
authorReginald Kennedy <rk@rejii.com>
Mon, 29 Apr 2013 18:44:23 +0000 (02:44 +0800)
committerReginald Kennedy <rk@rejii.com>
Mon, 29 Apr 2013 18:57:22 +0000 (02:57 +0800)
spectrwm.c

index 6945965a4b2deb3de60434a1d97ce4bfb01c9a1a..38883f6ad4be528822be8342072f10c0b888a04d 100644 (file)
@@ -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;