Skip to content

Commit

Permalink
Fix an NPE in the isOutlawInTown method (#7736)
Browse files Browse the repository at this point in the history
  • Loading branch information
Warriorrrr authored Jan 20, 2025
1 parent 94dc241 commit eeacf49
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,9 @@ public static boolean isArenaPlot(TownBlock attackerTB, TownBlock defenderTB) {
* @return true if one of the players is an outlaw in a situation where that matters.
*/
private static boolean isOutlawInTown(TownBlock defenderTB, Player attackingPlayer, Player defendingPlayer) {
if (defenderTB == null)
return false;

Town town = defenderTB.getTownOrNull();
if (town == null)
return false;
Expand Down

0 comments on commit eeacf49

Please sign in to comment.