Browse Source

Harden against null

combat-2
MagicBot 1 year ago
parent
commit
e73b8d2826
  1. 2
      src/engine/gameManager/BuildingManager.java

2
src/engine/gameManager/BuildingManager.java

@ -343,6 +343,7 @@ public enum BuildingManager { @@ -343,6 +343,7 @@ public enum BuildingManager {
Mob hirelingMob = (Mob) hireling;
if (hirelingMob.getParentZone() != null)
if (hirelingMob.getParentZone().zoneMobSet.contains(hirelingMob))
hirelingMob.getParentZone().zoneMobSet.remove(hireling);
}
@ -352,6 +353,7 @@ public enum BuildingManager { @@ -352,6 +353,7 @@ public enum BuildingManager {
NPC hirelingNPC = (NPC) hireling;
if (hirelingNPC.getParentZone() != null)
if (hirelingNPC.getParentZone().zoneNPCSet.contains(hirelingNPC))
hirelingNPC.getParentZone().zoneNPCSet.remove(hireling);
}

Loading…
Cancel
Save