Fix #118163: Crash hiding face sets with multires
Caused byce4ec6d42bCrash occurs due to accessing `corner_tri_faces` when pbvh tpye is "grid". Fix is same as72d324bd81Pull Request: https://projects.blender.org/blender/blender/pulls/118183
This commit is contained in:
committed by
Pratik Borhade
parent
0b9ec567c8
commit
18912561b5
@@ -982,8 +982,10 @@ static void face_hide_update(Object &object,
|
||||
threading::parallel_for(nodes.index_range(), 1, [&](const IndexRange range) {
|
||||
TLS &tls = all_tls.local();
|
||||
for (PBVHNode *node : nodes.slice(range)) {
|
||||
const Span<int> faces = bke::pbvh::node_face_indices_calc_mesh(
|
||||
pbvh, *node, tls.face_indices);
|
||||
const Span<int> faces =
|
||||
(BKE_pbvh_type(&pbvh) == PBVH_FACES) ?
|
||||
bke::pbvh::node_face_indices_calc_mesh(pbvh, *node, tls.face_indices) :
|
||||
bke::pbvh::node_face_indices_calc_grids(pbvh, *node, tls.face_indices);
|
||||
|
||||
tls.new_hide.reinitialize(faces.size());
|
||||
MutableSpan<bool> new_hide = tls.new_hide;
|
||||
|
||||
Reference in New Issue
Block a user