From f5b6e13a260572ad24a6c7a706acfd7cd948508a Mon Sep 17 00:00:00 2001 From: Arndt Brenschede Date: Tue, 6 Sep 2016 19:19:42 +0200 Subject: [PATCH] ups-bug-fix --- brouter-core/src/main/java/btools/router/OsmTrack.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/brouter-core/src/main/java/btools/router/OsmTrack.java b/brouter-core/src/main/java/btools/router/OsmTrack.java index f38baa8..9529fb7 100644 --- a/brouter-core/src/main/java/btools/router/OsmTrack.java +++ b/brouter-core/src/main/java/btools/router/OsmTrack.java @@ -722,16 +722,16 @@ public final class OsmTrack { OsmPathElement e = element; int cnt = 0; - while( e != null ) + while( e != null && e.origin != null ) { - if ( e.origin == root ) + if ( e.origin.getILat() == root.getILat() && e.origin.getILon() == root.getILon() ) { return e.message; } e = e.origin; if ( cnt++ == 1000000 ) { - throw new IllegalArgumentException( "ups?" ); + throw new IllegalArgumentException( "ups: " + root + "->" + element ); } } return null;