Bugfix #24570
When using a startup.blend without user prefs (themes etc) saved, Blender crashed. Added a provision to then fall back to the compiled in startup, including a print in console.
This commit is contained in:
@@ -340,7 +340,7 @@ int WM_read_homefile(bContext *C, wmOperator *op)
|
||||
ListBase wmbase;
|
||||
char tstr[FILE_MAXDIR+FILE_MAXFILE];
|
||||
int from_memory= op && strcmp(op->type->idname, "WM_OT_read_factory_settings")==0;
|
||||
int success;
|
||||
int success= 0;
|
||||
|
||||
free_ttfont(); /* still weird... what does it here? */
|
||||
|
||||
@@ -366,7 +366,13 @@ int WM_read_homefile(bContext *C, wmOperator *op)
|
||||
|
||||
if (!from_memory && BLI_exists(tstr)) {
|
||||
success = BKE_read_file(C, tstr, NULL);
|
||||
} else {
|
||||
|
||||
if(U.themes.first==NULL) {
|
||||
printf("\nError: No valid startup.blend, fall back to built-in default.\n\n");
|
||||
success = 0;
|
||||
}
|
||||
}
|
||||
if(success==0) {
|
||||
success = BKE_read_file_from_memory(C, datatoc_startup_blend, datatoc_startup_blend_size, NULL);
|
||||
if (wmbase.first == NULL) wm_clear_default_size(C);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user