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 497bc4d199
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user