Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2012-12-13 15:27:21 +0400
committerTon Roosendaal <ton@blender.org>2012-12-13 15:27:21 +0400
commitc44d10547975f55c98e6b82e615d0ee34f5d6470 (patch)
tree33a1258bf87961067fcdbb4222e928614a9735fb /source/blender
parentdfc3685b1f93092a03b156571d640c64eb0ad955 (diff)
Bugfix, IRC report:
If a new userpref.blend was loaded, but no startup.blend existed yet, Blender crashed.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/windowmanager/intern/wm_files.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 73f26185764..cd5da43646c 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -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;