Blender Git Loki

Git Commits -> Revision 5a5788a

Revision 5a5788a by Philipp Oeser (blender-v2.93-release)
November 2, 2021, 11:53 (GMT)
Fix T92246: sculpt crash displaying statistics in certain situations

It seems possible to switch object selection (if `Lock Object Modes` is
turned off) and end up with an object that has a SculptSession but a
NULL PBVH.
(I was not able to repro from scratch, but file from the report was
clearly in that state).

This would crash in displaying scene statistics.

While there might be a deeper fix (making sure PBVH is available early
enough -- possibly using `BKE_sculpt_object_pbvh_ensure`,
`sculpt_update_object` or friends), there are also many checks in tools
for PBVH, so the situation seems to be somewhat vaild/expected also in
other places.
So to fix this, just check for a non-NULL PBVH, returning early
otherwise.
Note: this leaves us with displaying 0/0 Faces & Vertices in the borked
case until an operation takes place that updates the PBVH.

Maniphest Tasks: T92246

Differential Revision: https://developer.blender.org/D12904

Commit Details:

Full Hash: 5a5788ace2d2a27eae72eb94389040928342fb0e
Parent Commit: 554b1b1
Lines Changed: +1, -1

1 Modified Path:

/source/blender/editors/space_info/info_stats.c (+1, -1) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021