From b664276ad893eff8fd4f86707ac426d1ef323416 Mon Sep 17 00:00:00 2001 From: fabianterhorst Date: Thu, 6 Apr 2017 23:09:40 +0200 Subject: [PATCH] * transformed points are nullable --- lib/src/main/java/io/fabianterhorst/isometric/Isometric.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/main/java/io/fabianterhorst/isometric/Isometric.java b/lib/src/main/java/io/fabianterhorst/isometric/Isometric.java index 3efe880..83a4594 100644 --- a/lib/src/main/java/io/fabianterhorst/isometric/Isometric.java +++ b/lib/src/main/java/io/fabianterhorst/isometric/Isometric.java @@ -203,6 +203,7 @@ public Item findItemForPosition(Point position) { //Todo: reverse sorting for click detection, because hidden object is getting drawed first und will be returned as the first as well //Items are already sorted for depth sort so break should not be a problem here for (Item item : this.items) { + if (item.transformedPoints == null) continue; List items = new ArrayList<>(); Point top = null, bottom = null, @@ -297,7 +298,6 @@ static class Item { } Item(Path path, Color baseColor) { - //transformedPoints = new ArrayList<>(); drawPath = new android.graphics.Path(); drawn = 0; this.paint = new Paint(Paint.ANTI_ALIAS_FLAG);