[Bf-blender-cvs] [c6ce2be4962] master: Fix T97627: Revert Window Redraw When Saving

Harley Acheson noreply at git.blender.org
Thu Apr 28 00:08:36 CEST 2022


Commit: c6ce2be4962de62415fadd8f4f38e5a9e12b5f64
Author: Harley Acheson
Date:   Wed Apr 27 15:07:34 2022 -0700
Branches: master
https://developer.blender.org/rBc6ce2be4962de62415fadd8f4f38e5a9e12b5f64

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

===================================================================

M	source/blender/windowmanager/intern/wm_files.c

===================================================================

diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index caa3a493349..bee7e71df54 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -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);



More information about the Bf-blender-cvs mailing list