Added some null pointer checks to prevent crashes.
This commit is contained in:
parent
44623daafe
commit
520b6af947
2 changed files with 4 additions and 1 deletions
|
|
@ -1614,6 +1614,9 @@ DEFINE_ACTION_FUNCTION(AActor, PoisonMobj)
|
|||
|
||||
bool AActor::OkayToSwitchTarget(AActor *other)
|
||||
{
|
||||
if (other == nullptr)
|
||||
return false;
|
||||
|
||||
if (other == this)
|
||||
return false; // [RH] Don't hate self (can happen when shooting barrels)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue