From d22ba7b89dcda83263560675a49c5f6f8cc2c054 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Fri, 31 May 2024 18:32:53 -0500 Subject: [PATCH] early exit for pets attacking a null target --- src/engine/mobileAI/MobAI.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/engine/mobileAI/MobAI.java b/src/engine/mobileAI/MobAI.java index 3115288c..b4cc9fd4 100644 --- a/src/engine/mobileAI/MobAI.java +++ b/src/engine/mobileAI/MobAI.java @@ -175,6 +175,8 @@ public class MobAI { public static void attackMob(Mob mob, Mob target) { try { + if(mob == null || target == null) + return; if (mob.getRange() >= 30 && mob.isMoving()) return;