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
path: root/source
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-04-20 18:58:46 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-04-20 18:58:46 +0400
commit716e9c5f47df26d658baadc2b23e7216903a2847 (patch)
treec61514dfc02a7df07340362ed9b4bc6e8131cc0c /source
parent870115be85c196183bd81b9d111a4aafc7900df3 (diff)
Fix case of accessing freed windowmanager memory after reading a file.
Diffstat (limited to 'source')
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 2b3d6fa856e..84a6b3598d7 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -420,7 +420,7 @@ static int wm_operator_exec(bContext *C, wmOperator *op, int repeat)
retval= op->type->exec(C, op);
- if(op->type->flag & OPTYPE_UNDO)
+ if(op->type->flag & OPTYPE_UNDO && CTX_wm_manager(C) == wm)
wm->op_undo_depth--;
}
@@ -570,7 +570,7 @@ int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, PointerR
retval= op->type->invoke(C, op, event);
- if(op->type->flag & OPTYPE_UNDO)
+ if(op->type->flag & OPTYPE_UNDO && CTX_wm_manager(C) == wm)
wm->op_undo_depth--;
}
else if(op->type->exec) {
@@ -579,7 +579,7 @@ int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, PointerR
retval= op->type->exec(C, op);
- if(op->type->flag & OPTYPE_UNDO)
+ if(op->type->flag & OPTYPE_UNDO && CTX_wm_manager(C) == wm)
wm->op_undo_depth--;
}
else
@@ -782,7 +782,7 @@ int WM_operator_call_py(bContext *C, wmOperatorType *ot, int context, PointerRNA
retval= op->type->exec(C, op);
- if(op->type->flag & OPTYPE_UNDO)
+ if(op->type->flag & OPTYPE_UNDO && CTX_wm_manager(C) == wm)
wm->op_undo_depth--;
}
else
@@ -1072,7 +1072,7 @@ static int wm_handler_operator_call(bContext *C, ListBase *handlers, wmEventHand
retval= ot->modal(C, op, event);
- if(ot->flag & OPTYPE_UNDO)
+ if(ot->flag & OPTYPE_UNDO && CTX_wm_manager(C) == wm)
wm->op_undo_depth--;
/* putting back screen context, reval can pass trough after modal failures! */
@@ -1217,7 +1217,7 @@ static int wm_handler_fileselect_call(bContext *C, ListBase *handlers, wmEventHa
retval= handler->op->type->exec(C, handler->op);
- if(handler->op->type->flag & OPTYPE_UNDO)
+ if(handler->op->type->flag & OPTYPE_UNDO && CTX_wm_manager(C) == wm)
wm->op_undo_depth--;
if (retval & OPERATOR_FINISHED)