Avoid out of bound exception
This commit is contained in:
parent
af7d034592
commit
2c6dc292a8
1 changed files with 2 additions and 1 deletions
|
@ -1092,7 +1092,8 @@ public class RouteProvider {
|
|||
for (int i = cDirInfo; i < directionInfo.size(); i++) {
|
||||
RouteDirectionInfo dirInfo = directionInfo.get(i);
|
||||
if (dirInfo.routePointOffset - routePointOffsetAdjusted >= cRoute) {
|
||||
if (dirInfo.getTurnType() != null && !dirInfo.getTurnType().isSkipToSpeak()) {
|
||||
if (dirInfo.getTurnType() != null && !dirInfo.getTurnType().isSkipToSpeak() &&
|
||||
dirInfo.routePointOffset - routePointOffsetAdjusted < routeNodes.size()) {
|
||||
Location loc = routeNodes.get(dirInfo.routePointOffset - routePointOffsetAdjusted);
|
||||
WptPt pt = new WptPt();
|
||||
pt.lat = loc.getLatitude();
|
||||
|
|
Loading…
Reference in a new issue