Fixes a NPE in the minimap when loading a new game.

This commit is contained in:
Stian Grenborgen 2024-01-04 08:52:00 +01:00
parent 7a9607ec13
commit e66d3f5d8c
1 changed files with 1 additions and 0 deletions

View File

@ -390,6 +390,7 @@ public final class MiniMap extends JPanel implements MouseInputListener {
g.fill(settlementPath);
}
if (!freeColClient.isMapEditor()
&& freeColClient.getMyPlayer() != null
&& !freeColClient.getMyPlayer().canSee(tile)
&& clientOptions.getBoolean(ClientOptions.MINIMAP_TOGGLE_FOG_OF_WAR)) {
Color blackTransparent = new Color(0, 0, 0, 100);