summaryrefslogtreecommitdiffstats
path: root/core/src/ch
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-01-06 18:37:20 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2016-01-06 18:37:20 +0100
commitf04f6ac44bd014f15c1d4435dc1d45fc3059e6bd (patch)
treec3f524946afd7aad5867499950b9b13c39bc85a8 /core/src/ch
parent4786b6eba151ab24c17ed228aaba118d1d38658d (diff)
downloadRustAndDust-f04f6ac44bd014f15c1d4435dc1d45fc3059e6bd.zip
RustAndDust-f04f6ac44bd014f15c1d4435dc1d45fc3059e6bd.tar.gz
Ctrl: do not process null Hex
Diffstat (limited to 'core/src/ch')
-rw-r--r--core/src/ch/asynk/rustanddust/game/Ctrl.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Ctrl.java b/core/src/ch/asynk/rustanddust/game/Ctrl.java
index ec974ca..4bb0893 100644
--- a/core/src/ch/asynk/rustanddust/game/Ctrl.java
+++ b/core/src/ch/asynk/rustanddust/game/Ctrl.java
@@ -108,7 +108,7 @@ public class Ctrl implements Disposable
public void touchUp(float hudX, float hudY, float mapX, float mapY)
{
- if (!blockMap && (touchedHex == map.getHexAt(mapX, mapY)))
+ if (!blockMap && (touchedHex != null) && (touchedHex == map.getHexAt(mapX, mapY)))
state.touch(touchedHex);
}