diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-12-07 19:59:10 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-12-07 19:59:10 +0300 |
commit | 161871316eee9eddaef3d653f436f36fc0726001 (patch) | |
tree | e5823f2c5f40af25ea5322448057676563cb6295 /source | |
parent | 74b80f8c3d30b8fc64fdf6eb023641ec94c6d57e (diff) |
Bugfix: WM could access freed memory when testing for click event after
opening a new file (and freeing the window and its event queue).
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index c19d1000573..3a74dbe0b16 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -1163,11 +1163,11 @@ static int wm_handlers_do(bContext *C, wmEvent *event, ListBase *handlers) /* fileread case */ if(CTX_wm_window(C)==NULL) - break; + return action; } /* test for CLICK event */ - if (event->val == KM_RELEASE && (action == WM_HANDLER_CONTINUE || action == (WM_HANDLER_BREAK|WM_HANDLER_MODAL))) { + if ((action == WM_HANDLER_CONTINUE || action == (WM_HANDLER_BREAK|WM_HANDLER_MODAL)) && event->val == KM_RELEASE) { wmWindow *win = CTX_wm_window(C); if (win && win->last_type == event->type && win->last_val == KM_PRESS) { |