- fixed last PR.

The result of GetPointer must be null checked as well!
This commit is contained in:
Christoph Oelckers 2019-01-07 01:09:19 +01:00
parent 7c91b27463
commit a1ae01e392

View file

@ -400,6 +400,10 @@ extend class Actor
if (!orresult) if (!orresult)
{ {
receiver = receiver.GetPointer(setreceiver); receiver = receiver.GetPointer(setreceiver);
if (receiver == NULL)
{
return false;
}
} }
// Owned inventory items cannot own anything because their Inventory pointer is repurposed for the owner's linked list. // Owned inventory items cannot own anything because their Inventory pointer is repurposed for the owner's linked list.
if (receiver is 'Inventory' && Inventory(receiver).Owner != null) if (receiver is 'Inventory' && Inventory(receiver).Owner != null)