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