From 4d04757a770277e3dc488ee154ba5d8f4dd6cc0f Mon Sep 17 00:00:00 2001 From: Marco Peereboom Date: Mon, 16 Feb 2009 04:45:35 +0000 Subject: [PATCH] Fix crash --- scrotwm.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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 -- 1.7.10.4