From e126add24b56470c8dc0cd7d0ee0dd71de22fb9a Mon Sep 17 00:00:00 2001 From: Marco Peereboom Date: Thu, 16 Jun 2011 13:53:43 +0000 Subject: [PATCH] this should fix a crash seen on linux as reported here: http://opensource.conformal.com/fluxbb/viewtopic.php?id=120 --- scrotwm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scrotwm.c b/scrotwm.c index 6ae2fc0..b96e6f4 100644 --- a/scrotwm.c +++ b/scrotwm.c @@ -1914,8 +1914,9 @@ focus_win(struct ws_win *win) else { /* use larger hammer since the window was killed somehow */ TAILQ_FOREACH(cfw, &win->ws->winlist, entry) - XSetWindowBorder(display, cfw->id, - cfw->ws->r->s->c[SWM_S_COLOR_UNFOCUS].color); + if (cfw->ws && cfw->ws->r && cfw->ws->r->s) + XSetWindowBorder(display, cfw->id, + cfw->ws->r->s->c[SWM_S_COLOR_UNFOCUS].color); } win->ws->focus = win; -- 1.7.10.4