From f04f6ac44bd014f15c1d4435dc1d45fc3059e6bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Wed, 6 Jan 2016 18:37:20 +0100 Subject: Ctrl: do not process null Hex --- core/src/ch/asynk/rustanddust/game/Ctrl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- cgit v1.1-2-g2b99