[Bf-blender-cvs] [2467f4df797] blender-v2.83-release: Fix T75607: crash trying to sculpt while remesh is in progress

Brecht Van Lommel noreply at git.blender.org
Thu Apr 23 17:11:00 CEST 2020


Commit: 2467f4df79755b4d503a1b7f93da36cea31fbc53
Author: Brecht Van Lommel
Date:   Thu Apr 23 17:09:29 2020 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rB2467f4df79755b4d503a1b7f93da36cea31fbc53

Fix T75607: crash trying to sculpt while remesh is in progress

The interface is already locked, but the paint brush drawing could stll be
reading the mesh that was being edited in another thread.

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

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

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

diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c
index d887d9b0eee..d3cd31c6e97 100644
--- a/source/blender/windowmanager/intern/wm_draw.c
+++ b/source/blender/windowmanager/intern/wm_draw.c
@@ -84,6 +84,13 @@ static void wm_paintcursor_draw(bContext *C, ScrArea *area, ARegion *region)
   bScreen *screen = WM_window_get_active_screen(win);
   wmPaintCursor *pc;
 
+  /* Don't draw paint cursors with locked interface. Painting is not possible
+   * then, and cursor drawing can use scene data that another thread may be
+   * modifying. */
+  if (wm->is_interface_locked) {
+    return;
+  }
+
   if (region->visible && region == screen->active_region) {
     for (pc = wm->paintcursors.first; pc; pc = pc->next) {



More information about the Bf-blender-cvs mailing list