diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2018-04-23 15:35:14 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2018-04-23 15:36:42 +0300 |
commit | 6c46174662c8db540a412e72656f146eb52afaf4 (patch) | |
tree | 056fabb1dbe550bb444fa009ee47458855d89dde /source/blender/windowmanager/intern | |
parent | 2183f93dbed2043e72c21833218ccf341ee4df36 (diff) |
Fix crash when opening file-browser through top-bar menus
Was probably caused by top-bar merge.
Diffstat (limited to 'source/blender/windowmanager/intern')
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 69537aa41c9..8ebf7d0dbb0 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -1953,13 +1953,14 @@ static int wm_handler_fileselect_do(bContext *C, ListBase *handlers, wmEventHand int action = WM_HANDLER_CONTINUE; switch (val) { - case EVT_FILESELECT_FULL_OPEN: + case EVT_FILESELECT_FULL_OPEN: { ScrArea *sa; - - /* sa can be null when window A is active, but mouse is over window B */ - /* in this case, open file select in original window A */ - if (handler->op_area == NULL) { + + /* sa can be null when window A is active, but mouse is over window B + * in this case, open file select in original window A. Also don't + * use global areas. */ + if (handler->op_area == NULL || ED_area_is_global(handler->op_area)) { bScreen *screen = CTX_wm_screen(C); sa = (ScrArea *)screen->areabase.first; } |