Fix T40823, crash with LoD operator without valid object.
This commit is contained in:
parent
dcc6300ddd
commit
92ecbd2998
Notes:
blender-bot
2023-02-14 10:25:59 +01:00
Referenced by issue #40823, Remove Level of Details command = crash
|
@ -1083,6 +1083,9 @@ void BKE_object_lod_sort(Object *ob)
|
|||
bool BKE_object_lod_remove(Object *ob, int level)
|
||||
{
|
||||
LodLevel *rem;
|
||||
|
||||
if (ob == NULL)
|
||||
return false;
|
||||
|
||||
if (level < 1 || level > BLI_countlist(&ob->lodlevels) - 1)
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue