- fixed: Remove ccmd should check if an object is actually an inventory object before attempting to check its owner. (Ooops!)

This commit is contained in:
Rachael Alexanderson 2017-01-19 18:48:21 -05:00
parent 545ae678e8
commit 62fb5d87c8

View file

@ -2110,7 +2110,7 @@ static int RemoveClass(const PClass *cls)
continue; continue;
} }
// [SP] Don't remove owned inventory objects. // [SP] Don't remove owned inventory objects.
if (static_cast<AInventory *>(actor)->Owner != NULL) if (actor->IsKindOf(RUNTIME_CLASS(AInventory)) && static_cast<AInventory *>(actor)->Owner != NULL)
{ {
continue; continue;
} }