Bugfix, IRC report:
If a new userpref.blend was loaded, but no startup.blend existed yet, Blender crashed.
This commit is contained in:
@@ -529,10 +529,6 @@ int wm_homefile_read(bContext *C, ReportList *UNUSED(reports), short from_memory
|
||||
success = (BKE_read_file(C, startstr, NULL) != BKE_READ_FILE_FAIL);
|
||||
|
||||
}
|
||||
if (!from_memory && BLI_exists(prefstr)) {
|
||||
success = BKE_read_file_userdef(prefstr, NULL);
|
||||
if (success) printf("read new prefs: %s\n", prefstr);
|
||||
}
|
||||
|
||||
if (U.themes.first == NULL) {
|
||||
printf("\nError: No valid "STRINGIFY (BLENDER_STARTUP_FILE)", fall back to built-in default.\n\n");
|
||||
@@ -550,6 +546,12 @@ int wm_homefile_read(bContext *C, ReportList *UNUSED(reports), short from_memory
|
||||
#endif
|
||||
}
|
||||
|
||||
/* check new prefs only after startup.blend was finished */
|
||||
if (!from_memory && BLI_exists(prefstr)) {
|
||||
int done = BKE_read_file_userdef(prefstr, NULL);
|
||||
if (done) printf("read new prefs: %s\n", prefstr);
|
||||
}
|
||||
|
||||
/* prevent buggy files that had G_FILE_RELATIVE_REMAP written out by mistake. Screws up autosaves otherwise
|
||||
* can remove this eventually, only in a 2.53 and older, now its not written */
|
||||
G.fileflags &= ~G_FILE_RELATIVE_REMAP;
|
||||
|
||||
Reference in New Issue
Block a user