Fix impassable layer crash
This commit is contained in:
parent
b60b263950
commit
4d2148ff56
1 changed files with 7 additions and 5 deletions
|
@ -169,11 +169,13 @@ public class ImpassableRoadsLayer extends OsmandMapLayer implements
|
||||||
|
|
||||||
for (RouteDataObject road : getMissingRoads()) {
|
for (RouteDataObject road : getMissingRoads()) {
|
||||||
Location location = getMissingRoadLocations().get(road.getId());
|
Location location = getMissingRoadLocations().get(road.getId());
|
||||||
int x = (int) tileBox.getPixXFromLatLon(location.getLatitude(), location.getLongitude());
|
if (location != null) {
|
||||||
int y = (int) tileBox.getPixYFromLatLon(location.getLatitude(), location.getLongitude());
|
int x = (int) tileBox.getPixXFromLatLon(location.getLatitude(), location.getLongitude());
|
||||||
if (calculateBelongs(ex, ey, x, y, compare)) {
|
int y = (int) tileBox.getPixYFromLatLon(location.getLatitude(), location.getLongitude());
|
||||||
compare = radius;
|
if (calculateBelongs(ex, ey, x, y, compare)) {
|
||||||
o.add(road);
|
compare = radius;
|
||||||
|
o.add(road);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue