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:
authorCampbell Barton <ideasman42@gmail.com>2011-04-23 07:31:27 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-04-23 07:31:27 +0400
commitd494c97b5899da83d19c4a47ed59075303bba1f8 (patch)
tree6cae8d9a509bec529a60e3c1d29ebe60289f2439 /source
parent1518d43f270e02a400b989f10ba9dce54abf6cd9 (diff)
fix for using enter on menus which load files:
commonly Ctrl+N,Enter or Ctrl+O,Enter
Diffstat (limited to 'source')
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 6b074029984..feff0393b88 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -1537,6 +1537,12 @@ static int wm_handlers_do(bContext *C, wmEvent *event, ListBase *handlers)
}
}
+ /* XXX fileread case, if the wm is freed then the handler's
+ * will have been too so the code below need not run. */
+ if(CTX_wm_window(C)==NULL) {
+ return action;
+ }
+
/* XXX code this for all modal ops, and ensure free only happens here */
/* modal ui handler can be tagged to be freed */
@@ -1546,10 +1552,6 @@ static int wm_handlers_do(bContext *C, wmEvent *event, ListBase *handlers)
wm_event_free_handler(handler);
}
}
-
- /* XXX fileread case */
- if(CTX_wm_window(C)==NULL)
- return action;
}
/* test for CLICK event */