From 80375ed70df8b3d5fb5a8b89b9f6a98b4691382b Mon Sep 17 00:00:00 2001 From: Reginald Kennedy Date: Wed, 5 Sep 2012 22:47:31 +0800 Subject: [PATCH] Fix possible segfault when a floater receives a configurerequest. --- spectrwm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/spectrwm.c b/spectrwm.c index ff3dfbd..0abdd65 100644 --- a/spectrwm.c +++ b/spectrwm.c @@ -7662,9 +7662,10 @@ configurerequest(xcb_configure_request_event_t *e) WIDTH(win) = win->g_float.w; HEIGHT(win) = win->g_float.h; - stack_floater(win, win->ws->r); - - focus_flush(); + if (r) { + stack_floater(win, r); + focus_flush(); + } } else { config_win(win, e); xcb_flush(conn); -- 1.7.10.4