Skip to content

Commit d479c6b

Browse files
author
Peter
committed
throw exception if via count is uninitialized
1 parent e0955f5 commit d479c6b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

core/src/main/java/com/graphhopper/util/ViaInstruction.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ public void setViaCount( int count )
4242

4343
public int getViaCount()
4444
{
45+
if (viaPosition < 0)
46+
throw new IllegalStateException("Uninitialized via count in instruction " + getName());
47+
4548
return viaPosition;
4649
}
4750

0 commit comments

Comments
 (0)