diff options
-rw-r--r-- | core/src/ch/asynk/tankontank/engine/Board.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Board.java b/core/src/ch/asynk/tankontank/engine/Board.java index d6426bb..b17170d 100644 --- a/core/src/ch/asynk/tankontank/engine/Board.java +++ b/core/src/ch/asynk/tankontank/engine/Board.java @@ -383,6 +383,8 @@ public abstract class Board implements Disposable public int removePawn(Pawn pawn) { Tile tile = pawn.getTile(); + if (tile == null) + return 0; int n = tile.remove(pawn); if (!tile.mustBeDrawn()) tilesToDraw.remove(tile); |