[Bf-blender-cvs] [58398acc682] blender2.8: Fix crash recovering last session

Campbell Barton noreply at git.blender.org
Fri Dec 7 05:05:22 CET 2018


Commit: 58398acc6821a374e8a36c88804c97b5b99ebb94
Author: Campbell Barton
Date:   Fri Dec 7 15:04:57 2018 +1100
Branches: blender2.8
https://developer.blender.org/rB58398acc6821a374e8a36c88804c97b5b99ebb94

Fix crash recovering last session

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

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

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

diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 73254678c6d..5339029900a 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -2062,7 +2062,6 @@ void WM_OT_revert_mainfile(wmOperatorType *ot)
 
 void WM_recover_last_session(bContext *C, ReportList *reports)
 {
-	Main *bmain = CTX_data_main(C);
 	char filepath[FILE_MAX];
 
 	BLI_make_file_string("/", filepath, BKE_tempdir_base(), BLENDER_QUIT_FILE);
@@ -2075,6 +2074,7 @@ void WM_recover_last_session(bContext *C, ReportList *reports)
 		G.fileflags &= ~G_FILE_RECOVER;
 
 		/* XXX bad global... fixme */
+		Main *bmain = CTX_data_main(C);
 		if (BKE_main_blendfile_path(bmain)[0] != '\0') {
 			G.file_loaded = 1;	/* prevents splash to show */
 		}



More information about the Bf-blender-cvs mailing list