Fix T40823, crash with LoD operator without valid object.

This commit is contained in:
Thomas Dinges
2014-06-26 23:51:28 +02:00
parent dcc6300ddd
commit 92ecbd2998

View File

@@ -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;