Fix #119969: Crash rendering in sculpt mode with multires active
SubdvigCCG is null for the evaluated mesh in the render depsgraph because of the `!for_render` check in `MOD_multires.cc`. But the PBVH type is still `PBVH_GRIDS`. That's a weird inconsistency that ideally wouldn't happen, but probably isn't simple to change. The simplest and most obviously harmless fix is to just check whether the list of PBVH nodes to update is empty.
This commit is contained in:
committed by
Thomas Dinges
parent
38e93e9608
commit
ba820cf8f4
@@ -1281,6 +1281,9 @@ void update_normals(PBVH &pbvh, SubdivCCG *subdiv_ccg)
|
||||
{
|
||||
Vector<PBVHNode *> nodes = search_gather(
|
||||
&pbvh, [&](PBVHNode &node) { return update_search(&node, PBVH_UpdateNormals); });
|
||||
if (nodes.is_empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (pbvh.header.type == PBVH_BMESH) {
|
||||
bmesh_normals_update(nodes);
|
||||
|
||||
Reference in New Issue
Block a user