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:
authorBastien Montagne <montagne29@wanadoo.fr>2018-06-05 18:56:18 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-06-05 18:56:18 +0300
commit7ff07ddd01af7923f32cfff087ec1f566cb4a0a8 (patch)
tree62d0e57111de4d6d6c70b85f0b597b67b1ea652b
parentf0d9dbae0dae4deae84824833096c38e625073cb (diff)
parent1628a6858e22d5e49798f84576283debc5cf2819 (diff)
Merge branch 'master' into blender2.8
Conflicts: source/blender/windowmanager/intern/wm_files.c
-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 b7e0b1cf5c4..088aca05268 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -673,7 +673,7 @@ int wm_homefile_read(
bool use_factory_settings, bool use_empty_data, bool use_userdef,
const char *filepath_startup_override, const char *app_template_override)
{
- Main *bmain = CTX_data_main(C);
+ Main *bmain = G.main; /* Context does not always have valid main pointer here... */
ListBase wmbase;
bool success = false;
@@ -865,13 +865,15 @@ int wm_homefile_read(
* can remove this eventually, only in a 2.53 and older, now its not written */
G.fileflags &= ~G_FILE_RELATIVE_REMAP;
- if (use_userdef) {
+ bmain = CTX_data_main(C);
+
+ if (use_userdef) {
/* check userdef before open window, keymaps etc */
- wm_init_userdef(CTX_data_main(C), read_userdef_from_memory);
+ wm_init_userdef(bmain, read_userdef_from_memory);
}
/* match the read WM with current WM */
- wm_window_match_do(C, &wmbase, &G.main->wm, &G.main->wm);
+ wm_window_match_do(C, &wmbase, &bmain->wm, &bmain->wm);
WM_check(C); /* opens window(s), checks keymaps */
bmain->name[0] = '\0';