[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [57027] trunk/blender/source/blender/ windowmanager/intern/wm_event_system.c: fix for incorrect type casting when checking macros exec() functions.

Campbell Barton ideasman42 at gmail.com
Sun May 26 00:07:21 CEST 2013


Revision: 57027
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57027
Author:   campbellbarton
Date:     2013-05-25 22:07:21 +0000 (Sat, 25 May 2013)
Log Message:
-----------
fix for incorrect type casting when checking macros exec() functions.
infact this worked by accident, but didn't crash.

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	2013-05-25 21:59:34 UTC (rev 57026)
+++ trunk/blender/source/blender/windowmanager/intern/wm_event_system.c	2013-05-25 22:07:21 UTC (rev 57027)
@@ -718,9 +718,10 @@
 	}
 	else if (op->opm) {
 		/* for macros, check all have exec() we can call */
-		wmOperator *opm;
-		for (opm = op->opm->type->macro.first; opm; opm = opm->next) {
-			if (opm->type->exec == NULL) {
+		wmOperatorTypeMacro *otmacro;
+		for (otmacro = op->opm->type->macro.first; otmacro; otmacro = otmacro->next) {
+			wmOperatorType *otm = WM_operatortype_find(otmacro->idname, 0);
+			if (otm && otm->exec == NULL) {
 				return false;
 			}
 		}




More information about the Bf-blender-cvs mailing list