[Bf-blender-cvs] [6c46174662c] blender2.8: Fix crash when opening file-browser through top-bar menus

Julian Eisel noreply at git.blender.org
Mon Apr 23 14:36:50 CEST 2018


Commit: 6c46174662c8db540a412e72656f146eb52afaf4
Author: Julian Eisel
Date:   Mon Apr 23 14:35:14 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB6c46174662c8db540a412e72656f146eb52afaf4

Fix crash when opening file-browser through top-bar menus

Was probably caused by top-bar merge.

===================================================================

M	source/blender/windowmanager/intern/wm_event_system.c

===================================================================

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;
 			}



More information about the Bf-blender-cvs mailing list