From 09a6e18d4f068dcdb2ddac121a9b6412270ef60e Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Tue, 18 Feb 2025 21:40:59 -0600 Subject: [PATCH] bug fix --- src/engine/objects/NPC.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/engine/objects/NPC.java b/src/engine/objects/NPC.java index 7f09fdc6..c0822b6d 100644 --- a/src/engine/objects/NPC.java +++ b/src/engine/objects/NPC.java @@ -876,10 +876,14 @@ public class NPC extends AbstractCharacter { // zone collection this.parentZone = ZoneManager.getZoneByUUID(this.parentZoneUUID); - if(this.parentZone != null) { - this.parentZone.zoneNPCSet.remove(this); - this.parentZone.zoneNPCSet.add(this); + if(this.parentZone == null) { + Logger.error("PARENT ZONE NOT IDENTIFIED FOR NPC : " + this.getObjectUUID()); + return; } + + this.parentZone.zoneNPCSet.remove(this); + this.parentZone.zoneNPCSet.add(this); + // Setup location for this NPC this.bindLoc = new Vector3fImmutable(this.statLat, this.statAlt, this.statLon);