summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/src/ch/asynk/rustanddust/engine/PathBuilder.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/src/ch/asynk/rustanddust/engine/PathBuilder.java b/core/src/ch/asynk/rustanddust/engine/PathBuilder.java
index bebb045..e8435be 100644
--- a/core/src/ch/asynk/rustanddust/engine/PathBuilder.java
+++ b/core/src/ch/asynk/rustanddust/engine/PathBuilder.java
@@ -70,6 +70,11 @@ public class PathBuilder implements Disposable
this.to = null;
this.distance = -1;
this.orientation = Orientation.KEEP;
+ this.clearPaths();
+ }
+
+ private void clearPaths()
+ {
for (Path path : this.paths) path.dispose();
this.tiles.clear();
this.stack.clear();