From 7ab9b06a04e7871590b826da5fa787a12c8153bc Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Fri, 4 Nov 2011 15:11:31 -0500 Subject: [PATCH] fix segfault on focusout --- xcompmgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xcompmgr.c b/xcompmgr.c index dcc0a8d..2e895bc 100644 --- a/xcompmgr.c +++ b/xcompmgr.c @@ -2307,7 +2307,7 @@ main(int argc, char **argv) { case FocusIn: { if (!inactive_transparency) break; win *fw = find_win(dpy, ev.xfocus.window); - if (fw->window_type == WINTYPE_NORMAL) { + if (fw && fw->window_type == WINTYPE_NORMAL) { fw->opacity = OPAQUE; determine_mode(dpy, fw); } @@ -2316,7 +2316,7 @@ main(int argc, char **argv) { case FocusOut: { if (!inactive_transparency) break; win *fw = find_win(dpy, ev.xfocus.window); - if (fw->window_type == WINTYPE_NORMAL) { + if (fw && fw->window_type == WINTYPE_NORMAL) { fw->opacity = (unsigned long)((double)0.5 * OPAQUE); determine_mode(dpy, fw); }