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>2013-07-02 09:54:28 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-02 09:54:28 +0400
commit83411dab076884af67e0195ab0a25a57102de278 (patch)
tree1ee067d9714047b0578e2f84b31669b51b7299b9 /source/blender/windowmanager
parent4c779f72f319ce6170c1be9ce3656bb2a8376033 (diff)
fix for crash in demo-mode, caused by r51702
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 5b469a6c50f..e57baf8801b 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -1480,15 +1480,17 @@ static int wm_handler_operator_call(bContext *C, ListBase *handlers, wmEventHand
if (ot->flag & OPTYPE_UNDO)
wm->op_undo_depth++;
+ /* warning, after this call all context data and 'event' may be freed. see check below */
retval = ot->modal(C, op, event);
OPERATOR_RETVAL_CHECK(retval);
- wm_event_modalmap_end(event);
/* when this is _not_ the case the modal modifier may have loaded
* a new blend file (demo mode does this), so we have to assume
* the event, operator etc have all been freed. - campbell */
if (CTX_wm_manager(C) == wm) {
+ wm_event_modalmap_end(event);
+
if (ot->flag & OPTYPE_UNDO)
wm->op_undo_depth--;