summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJérémie Courrèges-Anglas <jca@wxcvbn.org>2013-04-10 16:39:22 +0200
committerJérémie Courrèges-Anglas <jca@wxcvbn.org>2013-04-10 16:39:22 +0200
commit36c099119b8a4df16bdd2d49362613955470de31 (patch)
tree366a614040311b696806c27eac2d97b99bb79345
parent5b323d2cd5fc711229f9acef46b1b4f9a9c2378a (diff)
downloadratpoison-36c099119b8a4df16bdd2d49362613955470de31.zip
destroy_window: frame could be NULL
* don't dereference it if NULL, as in unmap_notify
-rw-r--r--src/events.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/events.c b/src/events.c
index 7ca9cb7..37bfc01 100644
--- a/src/events.c
+++ b/src/events.c
@@ -236,10 +236,10 @@ destroy_window (XDestroyWindowEvent *ev)
if (frame->number == win->scr->current_frame
&& current_screen() == win->scr)
set_active_frame (frame, 0);
+ /* Since we may have switched windows, call the hook. */
+ if (frame->win_number != EMPTY)
+ hook_run (&rp_switch_win_hook);
}
- /* Since we may have switched windows, call the hook. */
- if (frame->win_number != EMPTY)
- hook_run (&rp_switch_win_hook);
withdraw_window (win);
}