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 drfrag
parent e751476957
commit 745ee03bba

View file

@ -393,14 +393,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)
{