diff options
author | Ton Roosendaal <ton@blender.org> | 2010-11-10 19:49:42 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2010-11-10 19:49:42 +0300 |
commit | 8df02539ba28ef93821740c4837901392eb18a98 (patch) | |
tree | 850ce477e6ea99bd9117e44fcc586412b079c1a3 /source/blender/windowmanager | |
parent | 278124669b9916e9254468169e9ff63fab94b661 (diff) |
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.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 2dbcb92e13d..e6d750ce8c1 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -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); } |