summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-11-23 22:18:43 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-11-23 22:18:43 +0100
commit95016312a86c742e76f630aab2af5e64ceed327b (patch)
tree7e8dda17bc9b7ca060a321f0e0443930b5b20b52 /core/src
parentcfc4fb12266f8630412bd58261d35d9087541f54 (diff)
downloadRustAndDust-95016312a86c742e76f630aab2af5e64ceed327b.zip
RustAndDust-95016312a86c742e76f630aab2af5e64ceed327b.tar.gz
Board: removePawn does nothing is pawn is not on a tile
Diffstat (limited to 'core/src')
-rw-r--r--core/src/ch/asynk/tankontank/engine/Board.java2
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);