Fix T97627: Revert Window Redraw When Saving
Removal of the `WM_redraw_windows` call in `wm_file_write` introduced in rB7a9cfd08a8d7415ff004809cf62570be9152273e as that can cause crashing while saving from a script. See D14780 for more details. Differential Revision: https://developer.blender.org/D14780 Reviewed by Campbell Barton
This commit is contained in:
parent
b60f3fe6ad
commit
c6ce2be496
Notes:
blender-bot
2023-02-14 10:04:50 +01:00
Referenced by issue #97627, Regression: BLI_findstring encountering segfault when script calls bpy.ops.wm.save_as_mainfile
|
@ -1760,11 +1760,9 @@ static bool wm_file_write(bContext *C,
|
|||
/* Enforce full override check/generation on file save. */
|
||||
BKE_lib_override_library_main_operations_create(bmain, true);
|
||||
|
||||
if (!G.background && BLI_thread_is_main()) {
|
||||
/* Redraw to remove menus that might be open.
|
||||
* But only in the main thread otherwise this can crash, see T92704. */
|
||||
WM_redraw_windows(C);
|
||||
}
|
||||
/* NOTE: Ideally we would call `WM_redraw_windows` here to remove any open menus. But we
|
||||
* can crash if saving from a script, see T92704 & T97627. Just checking `!G.background
|
||||
* && BLI_thread_is_main()` is not sufficient to fix this. */
|
||||
|
||||
/* don't forget not to return without! */
|
||||
WM_cursor_wait(true);
|
||||
|
|
Loading…
Reference in New Issue