mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-22 01:11:49 +00:00
- fixed last PR.
The result of GetPointer must be null checked as well!
This commit is contained in:
parent
9baf765d8b
commit
ab588d1c99
1 changed files with 4 additions and 0 deletions
|
@ -402,6 +402,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)
|
||||||
|
|
Loading…
Reference in a new issue