From 9c241eae487f29f6eb3e996fb2d39c82ceeb0b75 Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Sun, 16 Aug 2020 19:00:38 +0200 Subject: [PATCH] Fix T79597: Crash with dyntopo after paint cursor refactor The paint cursor now uses a single call to SCULPT_cursor_geometry_info_update and the Sculpt API to update both the radius and the SculptSession data, so random access needs to be initialized for dyntopo before using API functions. Reviewed By: sergey Maniphest Tasks: T79597 Differential Revision: https://developer.blender.org/D8489 --- source/blender/editors/sculpt_paint/sculpt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index d68b1226b40..2fdf04a8b46 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -7125,6 +7125,7 @@ bool SCULPT_cursor_geometry_info_update(bContext *C, /* Update the active vertex of the SculptSession. */ ss->active_vertex_index = srd.active_vertex_index; + SCULPT_vertex_random_access_ensure(ss); copy_v3_v3(out->active_vertex_co, SCULPT_active_vertex_co_get(ss)); switch (BKE_pbvh_type(ss->pbvh)) {