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:
parent
0b80d5e755
commit
684dbba6a1
|
@ -1281,6 +1281,9 @@ void update_normals(PBVH &pbvh, SubdivCCG *subdiv_ccg)
|
||||||
{
|
{
|
||||||
Vector<PBVHNode *> nodes = search_gather(
|
Vector<PBVHNode *> nodes = search_gather(
|
||||||
&pbvh, [&](PBVHNode &node) { return update_search(&node, PBVH_UpdateNormals); });
|
&pbvh, [&](PBVHNode &node) { return update_search(&node, PBVH_UpdateNormals); });
|
||||||
|
if (nodes.is_empty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (pbvh.header.type == PBVH_BMESH) {
|
if (pbvh.header.type == PBVH_BMESH) {
|
||||||
bmesh_normals_update(nodes);
|
bmesh_normals_update(nodes);
|
||||||
|
|
Loading…
Reference in New Issue