fix segfault on focusout

This commit is contained in:
Christopher Jeffrey 2011-11-04 15:11:31 -05:00
parent 47d61d34ae
commit 7ab9b06a04
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}