NPE evade. Fixes #712.
This commit is contained in:
parent
446ba5c74c
commit
a70ee689c6
@ -1019,7 +1019,8 @@ public class EngineMain extends EngineAbstract
|
||||
// ... if there is a faction at the players location ...
|
||||
PS ps = PS.valueOf(player.getLocation()).getChunk(true);
|
||||
Faction factionAtPs = BoardColl.get().getFactionAt(ps);
|
||||
if (factionAtPs.isNone()) return; // TODO: An NPE can arise here? Why?
|
||||
if (factionAtPs == null) return;
|
||||
if (factionAtPs.isNone()) return;
|
||||
|
||||
// ... the command may be denied in the territory of this relation type ...
|
||||
Rel rel = factionAtPs.getRelationTo(mplayer);
|
||||
|
Loading…
Reference in New Issue
Block a user