From: Marco Peereboom Date: Mon, 16 Feb 2009 04:45:35 +0000 (+0000) Subject: Fix crash X-Git-Url: https://jasonwoof.com/gitweb/?a=commitdiff_plain;h=4d04757a770277e3dc488ee154ba5d8f4dd6cc0f;p=spectrwm.git Fix crash --- diff --git a/scrotwm.c b/scrotwm.c index 55b8896..11b75f0 100644 --- 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