JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
Fix crash
authorMarco Peereboom <marco@conformal.com>
Mon, 16 Feb 2009 04:45:35 +0000 (04:45 +0000)
committerMarco Peereboom <marco@conformal.com>
Mon, 16 Feb 2009 04:45:35 +0000 (04:45 +0000)
scrotwm.c

index 55b8896..11b75f0 100644 (file)
--- a/scrotwm.c
+++ b/scrotwm.c
@@ -2486,13 +2486,15 @@ configurenotify(XEvent *e)
        DNPRINTF(SWM_D_EVENT, "configurenotify: window: %lu\n",
            e->xconfigure.window);
 
+       XMapWindow(display, e->xconfigure.window);
        win = find_window(e->xconfigure.window);
-       XMapWindow(display, win->id);
-       XGetWMNormalHints(display, win->id, &win->sh, &mask);
-       adjust_font(win);
-       XMapWindow(display, win->id);
-       if (font_adjusted)
-               stack();
+       if (win) {
+               XGetWMNormalHints(display, win->id, &win->sh, &mask);
+               adjust_font(win);
+               XMapWindow(display, win->id);
+               if (font_adjusted)
+                       stack();
+       }
 }
 
 void