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:
authorCampbell Barton <ideasman42@gmail.com>2021-08-12 13:32:37 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-08-12 13:43:16 +0300
commit6293cf61312763152b00cb4f588061f7b281caf7 (patch)
tree172f0abf278622cb55ea83e3ba5cf5c4ebd2116c
parentad2fb92e9c8ff302d3bddbe77d7504bd8d307aca (diff)
Fix T90630: Crash loading certain user preferences
Clearing the window was done in wm_file_read_post which was deferred. This was needed as it left the context in an invalid state where the window was set but the screen wasn't. Crashing when setting up keymaps that attempted to access the scene from the window in the property update function. Regression in 497bc4d19977abc7b9e2c0f5024a23057e680954
-rw-r--r--source/blender/windowmanager/intern/wm_files.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 21c16e94097..b53ad0ee927 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -1343,6 +1343,9 @@ void wm_homefile_read_ex(bContext *C,
else {
*r_params_file_read_post = MEM_mallocN(sizeof(struct wmFileReadPost_Params), __func__);
**r_params_file_read_post = params_file_read_post;
+
+ /* Match #wm_file_read_post which leaves the window cleared too. */
+ CTX_wm_window_set(C, NULL);
}
}
}