Fix exception when route can't be calculated using basemap

This commit is contained in:
Victor Shcherb 2018-05-03 00:59:34 +02:00
parent e95c624555
commit 36c0df00e7

View file

@ -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);