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-03-12 07:35:13 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-03-12 08:13:36 +0300
commit2a5f22c1afc9d143f3e1c784a0139e0d990d5a4a (patch)
treea39b4ca80301a69a07efa4445a66dfd16209525d /source/blender/windowmanager/intern/wm_files.c
parent2e9fb211c6c8d69b2dc68c05b90a07c6eb9cc37d (diff)
Cleanup: set the window manager to the updated context on load
While this happened to be corrected by code that runs afterwards, leaving this in an invalid state could cause problems in the future.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_files.c')
-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 8357dfd7417..227520ed3f9 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -322,6 +322,9 @@ static void wm_window_match_replace_by_file_wm(bContext *C,
SWAP(wmWindowManager *, oldwm, wm);
BLI_addhead(current_wm_list, oldwm);
BLI_addhead(readfile_wm_list, wm);
+
+ /* Don't leave the old pointer in the context. */
+ CTX_wm_manager_set(C, wm);
}
bool has_match = false;