summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank/engine
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-09-23 17:10:55 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2014-09-23 17:10:55 +0200
commita2fdafa229cadee934b11b492916bf2d8131eba5 (patch)
tree98bc636e8fc8766bd870951959398704b696c4ae /core/src/ch/asynk/tankontank/engine
parent494a152f99bbceff721f283f46724ecafa40896a (diff)
downloadRustAndDust-a2fdafa229cadee934b11b492916bf2d8131eba5.zip
RustAndDust-a2fdafa229cadee934b11b492916bf2d8131eba5.tar.gz
Tile#occupied: prevent null ref access
Diffstat (limited to 'core/src/ch/asynk/tankontank/engine')
-rw-r--r--core/src/ch/asynk/tankontank/engine/Tile.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Tile.java b/core/src/ch/asynk/tankontank/engine/Tile.java
index 6f40f8c..92b8dc4 100644
--- a/core/src/ch/asynk/tankontank/engine/Tile.java
+++ b/core/src/ch/asynk/tankontank/engine/Tile.java
@@ -48,6 +48,7 @@ public abstract class Tile implements BasicDrawable
public boolean occupied()
{
+ if (stack == null) return false;
return (stack.size() != 0);
}