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:
authorHans Goudey <h.goudey@me.com>2022-09-12 22:15:43 +0300
committerHans Goudey <h.goudey@me.com>2022-09-13 00:12:18 +0300
commit5bad311f4ce47194a181d902637299fe26fd17ba (patch)
tree6a13153282b8c55eb2807d5995b3b5ae652b9a66 /source/blender/editors/sculpt_paint/sculpt.c
parent752a9b743e9703e674b28e0bc041a43011147676 (diff)
Fix: Multires crash after recent face set refactor
Missing null check when retrieving face sets for multires automasking. Caused by b5f7af31d6d474c3b455b.
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 119bd254abf..65e69bd8761 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -329,8 +329,14 @@ int SCULPT_active_face_set_get(SculptSession *ss)
{
switch (BKE_pbvh_type(ss->pbvh)) {
case PBVH_FACES:
- return ss->face_sets ? ss->face_sets[ss->active_face_index] : SCULPT_FACE_SET_NONE;
+ if (!ss->face_sets) {
+ return SCULPT_FACE_SET_NONE;
+ }
+ return ss->face_sets[ss->active_face_index];
case PBVH_GRIDS: {
+ if (!ss->face_sets) {
+ return SCULPT_FACE_SET_NONE;
+ }
const int face_index = BKE_subdiv_ccg_grid_to_face_index(ss->subdiv_ccg,
ss->active_grid_index);
return ss->face_sets[face_index];