[Bf-blender-cvs] [184c7a2] blender-v2.75-release: Fix possible NULL pointer use

Campbell Barton noreply at git.blender.org
Thu Jun 18 17:36:40 CEST 2015


Commit: 184c7a208c42fb4830462093f7d34ac6157952a3
Author: Campbell Barton
Date:   Thu Jun 11 23:56:20 2015 +1000
Branches: blender-v2.75-release
https://developer.blender.org/rB184c7a208c42fb4830462093f7d34ac6157952a3

Fix possible NULL pointer use

===================================================================

M	source/blender/windowmanager/intern/wm_event_system.c

===================================================================

diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 889a36b..b1fe4bf 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -1137,7 +1137,10 @@ static int wm_operator_invoke(
 				int bounds[4] = {-1, -1, -1, -1};
 				bool wrap;
 
-				if (op->opm) {
+				if (event == NULL) {
+					wrap = false;
+				}
+				else if (op->opm) {
 					wrap = (U.uiflag & USER_CONTINUOUS_MOUSE) &&
 					       ((op->opm->flag & OP_IS_MODAL_GRAB_CURSOR) || (op->opm->type->flag & OPTYPE_GRAB_CURSOR));
 				}
@@ -1159,7 +1162,7 @@ static int wm_operator_invoke(
 					ARegion *ar = CTX_wm_region(C);
 					ScrArea *sa = CTX_wm_area(C);
 
-					if (ar && ar->regiontype == RGN_TYPE_WINDOW && event &&
+					if (ar && ar->regiontype == RGN_TYPE_WINDOW &&
 					    BLI_rcti_isect_pt_v(&ar->winrct, &event->x))
 					{
 						winrect = &ar->winrct;




More information about the Bf-blender-cvs mailing list