diff --git a/OsmAnd-java/src/net/osmand/router/PrecalculatedRouteDirection.java b/OsmAnd-java/src/net/osmand/router/PrecalculatedRouteDirection.java index 6896cfbc64..d11044f0fd 100644 --- a/OsmAnd-java/src/net/osmand/router/PrecalculatedRouteDirection.java +++ b/OsmAnd-java/src/net/osmand/router/PrecalculatedRouteDirection.java @@ -263,10 +263,10 @@ public class PrecalculatedRouteDirection { minSpeed = ctx.getRouter().getMinDefaultSpeed(); maxSpeed = ctx.getRouter().getMaxDefaultSpeed(); if(ind1 == -1) { - throw new IllegalArgumentException(); + return null; } if(ind2 == -1) { - throw new IllegalArgumentException(); + return null; } PrecalculatedRouteDirection routeDirection = new PrecalculatedRouteDirection(this, ind1, ind2); routeDirection.startPoint = calc(ctx.startX, ctx.startY);