forked from organicmaps/organicmaps
[android] Fixed crash with routing after state restoring.
This commit is contained in:
parent
27e3be8682
commit
94f74c64fd
1 changed files with 6 additions and 0 deletions
|
@ -348,6 +348,12 @@ public class RoutingLayout extends FrameLayout implements View.OnClickListener
|
|||
}
|
||||
|
||||
Location location = LocationHelper.INSTANCE.getLastLocation();
|
||||
if (location == null)
|
||||
{
|
||||
// TODO remove that hack after proper route reconstruction logic will be finished
|
||||
setState(State.HIDDEN, false);
|
||||
return;
|
||||
}
|
||||
Framework.nativeBuildRoute(location.getLatitude(), location.getLongitude(), mEndPoint.getLat(), mEndPoint.getLon());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue