Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2020-04-23 18:09:29 +0300
committerBrecht Van Lommel <brecht@blender.org>2020-04-23 18:10:23 +0300
commit2467f4df79755b4d503a1b7f93da36cea31fbc53 (patch)
tree175016fbf9da52ead3e75a69ab2deeb781eef945 /source/blender/windowmanager/intern/wm_draw.c
parent53de2c3e4f5bc09b7c7520cdb0b91d8048604996 (diff)
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.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_draw.c')
-rw-r--r--source/blender/windowmanager/intern/wm_draw.c7
1 files changed, 7 insertions, 0 deletions
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) {