commit | ae6e2717c57fc22286cb29d84dfd1198d7ebc417 | [log] [tgz] |
---|---|---|
author | Kristian Høgsberg <krh@bitplanet.net> | Thu Jan 26 11:09:20 2012 -0500 |
committer | Kristian Høgsberg <krh@bitplanet.net> | Thu Jan 26 11:09:20 2012 -0500 |
tree | 5f70e782cebc3b79f24487cf4d93b8da85380314 | |
parent | 681f9f4149611a4c91d5ebcf6896bca155180c4e [diff] [blame] |
window: Don't crash when window with focus_widget is destroyed We would try to deliver a leave event to a widget in a destroyed window.
diff --git a/clients/window.c b/clients/window.c index 1356c75..7ba6a22 100644 --- a/clients/window.c +++ b/clients/window.c
@@ -974,6 +974,9 @@ input->pointer_focus = NULL; if (input->keyboard_focus == window) input->keyboard_focus = NULL; + if (input->focus_widget && + input->focus_widget->window == window) + input->focus_widget = NULL; } if (window->frame)