---
 .../client/control/FreeColClientHolder.java        |  2 +-
 src/net/sf/freecol/client/gui/panel/MiniMap.java   | 25 +++++++---------------
 2 files changed, 9 insertions(+), 18 deletions(-)

diff --git a/src/net/sf/freecol/client/control/FreeColClientHolder.java 
b/src/net/sf/freecol/client/control/FreeColClientHolder.java
index 5cd907421ab..773b6283fe1 100644
--- a/src/net/sf/freecol/client/control/FreeColClientHolder.java
+++ b/src/net/sf/freecol/client/control/FreeColClientHolder.java
@@ -147,7 +147,7 @@ public class FreeColClientHolder {
      * @return The {@code Specification} held by the game.
      */
     protected Specification getSpecification() {
-        Game game = getGame();
+        Game game = this.freeColClient.getGame();
         return (game == null) ? null : game.getSpecification();
     }
 
diff --git a/src/net/sf/freecol/client/gui/panel/MiniMap.java 
b/src/net/sf/freecol/client/gui/panel/MiniMap.java
index d7d82b252c0..8e2b0c0c876 100644
--- a/src/net/sf/freecol/client/gui/panel/MiniMap.java
+++ b/src/net/sf/freecol/client/gui/panel/MiniMap.java
@@ -102,21 +102,12 @@ public final class MiniMap extends JPanel implements 
MouseInputListener {
     }
 
     /**
-     * Internal game accessor.
-     *
-     * @return The {@code Game}.
-     */
-    private Game getGame() {
-        return this.freeColClient.getGame();
-    }
-
-    /**
      * Internal Map accessor.
      *
      * @return The {@code Map}.
      */
     private Map getMap() {
-        Game game = getGame();
+        Game game = this.freeColClient.getGame();
         return (game == null) ? null : game.getMap();
     }
 
@@ -156,8 +147,8 @@ public final class MiniMap extends JPanel implements 
MouseInputListener {
      * @return a {@code boolean} value
      */
     public boolean canZoomIn() {
-        return (freeColClient.getGame() != null
-                && freeColClient.getGame().getMap() != null
+        Game game = freeColClient.getGame();
+        return (game != null && game.getMap() != null
                 && tileSize < MAX_TILE_SIZE);
     }
 
@@ -167,8 +158,8 @@ public final class MiniMap extends JPanel implements 
MouseInputListener {
      * @return a {@code boolean} value
      */
     public boolean canZoomOut() {
-        return (freeColClient.getGame() != null
-                && freeColClient.getGame().getMap() != null
+        Game game = freeColClient.getGame();
+        return (game != null && game.getMap() != null
                 && tileSize > MIN_TILE_SIZE);
     }
 
@@ -195,10 +186,10 @@ public final class MiniMap extends JPanel implements 
MouseInputListener {
      */
     @Override
     public void paintComponent(Graphics graphics) {
-        if (freeColClient.getGame() == null
-            || freeColClient.getGame().getMap() == null) {
+        Game game = freeColClient.getGame();
+        if (game == null || game.getMap() == null)
             return;
-        }
+
         
graphics.drawImage(ResourceManager.getImage("image.background.MiniMap"),
             0, 0, null);
         paintMap(graphics);
-- 
2.11.0.rc0.7.gbe5a750


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Freecol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freecol-developers

Reply via email to