Fix nullpointer
This commit is contained in:
parent
7352a5e820
commit
2288fae1a0
2 changed files with 2 additions and 1 deletions
|
@ -23,6 +23,7 @@ public class RouteDirectionInfo {
|
||||||
return (int) (distance / averageSpeed);
|
return (int) (distance / averageSpeed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME How it can be null? (fix by constructor and revert MapInfoLayer)
|
||||||
public TurnType turnType;
|
public TurnType turnType;
|
||||||
// location when you should action (turn or go ahead)
|
// location when you should action (turn or go ahead)
|
||||||
public int routePointOffset;
|
public int routePointOffset;
|
||||||
|
|
|
@ -544,7 +544,7 @@ public class MapInfoLayer extends OsmandMapLayer {
|
||||||
if (d >= 0 && !showMiniMap) {
|
if (d >= 0 && !showMiniMap) {
|
||||||
visible = true;
|
visible = true;
|
||||||
RouteDirectionInfo next = routeLayer.getHelper().getNextRouteDirectionInfo();
|
RouteDirectionInfo next = routeLayer.getHelper().getNextRouteDirectionInfo();
|
||||||
if (next == null) {
|
if (next == null || next.turnType == null) {
|
||||||
if (turnType != null) {
|
if (turnType != null) {
|
||||||
turnType = null;
|
turnType = null;
|
||||||
invalidate();
|
invalidate();
|
||||||
|
|
Loading…
Reference in a new issue