diff --git a/src/engine/objects/Mine.java b/src/engine/objects/Mine.java index b2892410..b0a10922 100644 --- a/src/engine/objects/Mine.java +++ b/src/engine/objects/Mine.java @@ -130,12 +130,16 @@ public class Mine extends AbstractGameObject { public static void releaseMineClaims(PlayerCharacter playerCharacter) { + if (playerCharacter == null) + return; + for (Mine mine : Mine.getMines()) { - if (mine.lastClaimer.equals(playerCharacter)) { - mine.lastClaimer = null; - mine.updateGuildOwner(null); - } + if (mine.lastClaimer != null) + if (mine.lastClaimer.equals(playerCharacter)) { + mine.lastClaimer = null; + mine.updateGuildOwner(null); + } } }