Move receiver NULL check above the orresult check (#695)

This is to prevent a VM abort from happening here if orresult is false.
This commit is contained in:
Cacodemon345 2019-01-07 06:04:09 +06:00 committed by Christoph Oelckers
parent 9fcb68d38b
commit 9baf765d8b

View file

@ -395,14 +395,14 @@ extend class Actor
{
int paramnum = 0;
if (!orresult)
{
receiver = receiver.GetPointer(setreceiver);
}
if (receiver == NULL)
{ // If there's nothing to receive it, it's obviously a fail, right?
return false;
}
if (!orresult)
{
receiver = receiver.GetPointer(setreceiver);
}
// 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)
{