From 95016312a86c742e76f630aab2af5e64ceed327b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Sun, 23 Nov 2014 22:18:43 +0100 Subject: Board: removePawn does nothing is pawn is not on a tile --- core/src/ch/asynk/tankontank/engine/Board.java | 2 ++ 1 file changed, 2 insertions(+) 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); -- cgit v1.1-2-g2b99