diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-09-23 17:10:55 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-09-23 17:10:55 +0200 |
commit | a2fdafa229cadee934b11b492916bf2d8131eba5 (patch) | |
tree | 98bc636e8fc8766bd870951959398704b696c4ae /core/src | |
parent | 494a152f99bbceff721f283f46724ecafa40896a (diff) | |
download | RustAndDust-a2fdafa229cadee934b11b492916bf2d8131eba5.zip RustAndDust-a2fdafa229cadee934b11b492916bf2d8131eba5.tar.gz |
Tile#occupied: prevent null ref access
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/ch/asynk/tankontank/engine/Tile.java | 1 |
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); } |