From 36c0df00e7c1b7e011c2cecf0bb2d67600f338fd Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Thu, 3 May 2018 00:59:34 +0200 Subject: [PATCH] Fix exception when route can't be calculated using basemap --- .../src/net/osmand/router/PrecalculatedRouteDirection.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);