[Crash] Fix out of bound arrays, other potential crashes (#3166)

This commit is contained in:
Aeadoin
2023-04-01 12:44:41 -04:00
committed by GitHub
parent 0d509a7f3a
commit 0df84e1ee6
9 changed files with 34 additions and 24 deletions
+2 -1
View File
@@ -904,8 +904,9 @@ bool Mob::IsBeneficialAllowed(Mob *target)
{
return false;
}
else if(mob2->IsBot())
else if (mob2 && mob2->IsBot()) {
return true;
}
}
else if(_NPC(mob1))
{