Fix #121187: Sculpt dynamic topology crash with empty mesh

Mistake in b3aca5b28f. Some sculpt PBVH code has null checks
so I must have assumed a null PBVH was an expected situation. It turns
out those null checks are very inconsistent. We would probably be better
off removing them and ensuring the PBVH always exists.
This commit is contained in:
Hans Goudey
2024-04-29 10:55:58 -04:00
parent d97f4493dc
commit a63e32fabf

View File

@@ -2163,7 +2163,7 @@ PBVH *build_bmesh(BMesh *bm,
pbvh::update_bmesh_offsets(pbvh.get(), cd_vert_node_offset, cd_face_node_offset);
if (bm->totface == 0) {
return {};
return pbvh.release();
}
/* bounding box array of all faces, no need to recalculate every time. */