diff --git a/vassal-app/src/main/java/VASSAL/build/module/map/boardPicker/board/mapgrid/Zone.java b/vassal-app/src/main/java/VASSAL/build/module/map/boardPicker/board/mapgrid/Zone.java index fb706c4ca1..5eddc882c9 100644 --- a/vassal-app/src/main/java/VASSAL/build/module/map/boardPicker/board/mapgrid/Zone.java +++ b/vassal-app/src/main/java/VASSAL/build/module/map/boardPicker/board/mapgrid/Zone.java @@ -361,6 +361,10 @@ else if (token.equals(GRID_LOCATION) && getGrid() != null) { // no grid to match against // try the geographic mean p = new Point(0, 0); + if (myPolygon.npoints <= 0) { + return p; + } + for (int i = 0; i < myPolygon.npoints; ++i) { p.translate(myPolygon.xpoints[i], myPolygon.ypoints[i]); }