Fix crash recovering last session

This commit is contained in:
Campbell Barton 2018-12-07 15:04:57 +11:00
parent 8f40fbad5b
commit 58398acc68
1 changed files with 1 additions and 1 deletions

View File

@ -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 */
}