From 779f5bbb5b15bd133cc0076860dcd8efcdb4e34d Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Wed, 29 May 2024 19:28:37 -0500 Subject: [PATCH] null resolution --- src/engine/objects/Mob.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index a64968f3..1b9f9510 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -1711,7 +1711,7 @@ public class Mob extends AbstractIntelligenceAgent { this.behaviourType = MobBehaviourType.GuardCaptain; this.spawnTime = 60 * 15; this.isPlayerGuard = true; - if(ZoneManager.getCityAtLocation(this.building.getLoc()) != null) + if(this.building != null && ZoneManager.getCityAtLocation(this.building.getLoc()) != null) this.guardedCity = ZoneManager.getCityAtLocation(this.building.getLoc()); else this.guardedCity = null;