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.
This commit is contained in:
Campbell Barton 2021-03-12 15:35:13 +11:00
parent 2e9fb211c6
commit 2a5f22c1af
1 changed files with 3 additions and 0 deletions

View File

@ -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;