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.
This commit is contained in:
Brecht Van Lommel 2020-04-23 17:09:29 +02:00
parent 53de2c3e4f
commit 2467f4df79
Notes: blender-bot 2023-02-13 22:54:39 +01:00
Referenced by issue #77455, Scale gizmos cause complete freezes in Blender 2.83 on Intel graphics
Referenced by issue #75607, Crash when sculpting while QuadriFlow Remesh is in progress
1 changed files with 7 additions and 0 deletions

View File

@ -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) {