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:
authorCampbell Barton <ideasman42@gmail.com>2012-03-22 01:01:58 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-22 01:01:58 +0400
commitff7088088f63a2cfb4ab9b2219c29afe751dfed8 (patch)
tree0afafd702798e0c1014b7a2bae9b042266620a1a /source/blender/windowmanager
parentd8623da305b81523f938b0cc0ebc942670cf0b97 (diff)
fix issue with own recent commit - was accessing freed 'wm' on loading files.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 095a6bae966..1c446346dc1 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -806,9 +806,10 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, P
if(WM_operator_poll(C, ot)) {
wmOperator *op= wm_operator_create(wm, ot, properties, reports); /* if reports==NULL, theyll be initialized */
+ const short is_nested_call = (wm->op_undo_depth != 0);
/* initialize setting from previous run */
- if(wm->op_undo_depth == 0) { /* not called by py script */
+ if(!is_nested_call) { /* not called by py script */
WM_operator_last_properties_init(op);
}
@@ -852,7 +853,7 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, P
if(retval & OPERATOR_HANDLED)
; /* do nothing, wm_operator_exec() has been called somewhere */
else if(retval & OPERATOR_FINISHED) {
- if (wm->op_undo_depth == 0) { /* not called by py script */
+ if (!is_nested_call) { /* not called by py script */
WM_operator_last_properties_store(op);
}
wm_operator_finished(C, op, 0);