[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [25172] trunk/blender/source/blender/ windowmanager/intern/wm_event_system.c: Bugfix: WM could access freed memory when testing for click event after
Brecht Van Lommel
brecht at blender.org
Mon Dec 7 17:59:12 CET 2009
Revision: 25172
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=25172
Author: blendix
Date: 2009-12-07 17:59:10 +0100 (Mon, 07 Dec 2009)
Log Message:
-----------
Bugfix: WM could access freed memory when testing for click event after
opening a new file (and freeing the window and its event queue).
Modified Paths:
--------------
trunk/blender/source/blender/windowmanager/intern/wm_event_system.c
Modified: trunk/blender/source/blender/windowmanager/intern/wm_event_system.c
===================================================================
--- trunk/blender/source/blender/windowmanager/intern/wm_event_system.c 2009-12-07 15:54:27 UTC (rev 25171)
+++ trunk/blender/source/blender/windowmanager/intern/wm_event_system.c 2009-12-07 16:59:10 UTC (rev 25172)
@@ -1163,11 +1163,11 @@
/* 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) {
More information about the Bf-blender-cvs
mailing list