summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'core/src')
-rw-r--r--core/src/ch/asynk/rustanddust/engine/PathIterator.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/src/ch/asynk/rustanddust/engine/PathIterator.java b/core/src/ch/asynk/rustanddust/engine/PathIterator.java
index 53f2f82..8a56729 100644
--- a/core/src/ch/asynk/rustanddust/engine/PathIterator.java
+++ b/core/src/ch/asynk/rustanddust/engine/PathIterator.java
@@ -41,6 +41,9 @@ public class PathIterator implements Iterator<Vector3>
@Override
public Vector3 next()
{
+ if (!hasNext())
+ throw new java.util.NoSuchElementException();
+
if (tile == to) {
v.z = orientation.r();
o = orientation;