Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/windowmanager/intern/wm_operators.c')
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 981467cbba6..ddc48ce6332 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -307,14 +307,9 @@ static int wm_macro_modal(bContext *C, wmOperator *op, const wmEvent *event)
/* if new operator is modal and also added its own handler */
if (retval & OPERATOR_RUNNING_MODAL && op->opm != opm) {
wmWindow *win = CTX_wm_window(C);
- wmEventHandler *handler = NULL;
-
- for (handler = win->modalhandlers.first; handler; handler = handler->next) {
- /* first handler in list is the new one */
- if (handler->op == op)
- break;
- }
+ wmEventHandler *handler;
+ handler = BLI_findptr(&win->modalhandlers, op, offsetof(wmEventHandler, op));
if (handler) {
BLI_remlink(&win->modalhandlers, handler);
wm_event_free_handler(handler);