0
0
Fork 0
mirror of https://github.com/ZDoom/qzdoom.git synced 2025-04-19 16:21:16 +00:00

Move receiver NULL check above the orresult check ()

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 7666997580
commit 70a07e154c

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)
{