From 7e9fdd97baf4d31fb044e9e714f93387d5d5934a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 25 May 2013 22:07:21 +0000 Subject: fix for incorrect type casting when checking macros exec() functions. infact this worked by accident, but didn't crash. --- source/blender/windowmanager/intern/wm_event_system.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source') diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index d83d27e63bd..91b7b81940b 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -718,9 +718,10 @@ int WM_operator_repeat_check(const bContext *UNUSED(C), wmOperator *op) } 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; } } -- cgit v1.2.3