diff --git a/OsmAnd/src/net/osmand/plus/base/MapViewTrackingUtilities.java b/OsmAnd/src/net/osmand/plus/base/MapViewTrackingUtilities.java index 375f08bc34..9518447439 100644 --- a/OsmAnd/src/net/osmand/plus/base/MapViewTrackingUtilities.java +++ b/OsmAnd/src/net/osmand/plus/base/MapViewTrackingUtilities.java @@ -276,9 +276,7 @@ public class MapViewTrackingUtilities implements OsmAndLocationListener, IMapLoc @Override public void locationChanged(double newLatitude, double newLongitude, Object source) { // when user start dragging - if(app.getLocationProvider().getLastKnownLocation() != null){ - setMapLinkedToLocation(false); - } + setMapLinkedToLocation(false); } public void switchRotateMapMode(){ diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashLocationFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashLocationFragment.java index a77bf6928c..f992b9bae2 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashLocationFragment.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashLocationFragment.java @@ -121,7 +121,7 @@ public abstract class DashLocationFragment extends DashBaseFragment { ImageView arrow, int arrowResId, TextView txt, LatLon toLoc, int screenOrientation, OsmandApplication app, Context ctx, boolean paint) { float[] mes = new float[2]; - if (fromLoc != null) { + if (fromLoc != null && toLoc != null) { Location.distanceBetween(toLoc.getLatitude(), toLoc.getLongitude(), fromLoc.getLatitude(), fromLoc.getLongitude(), mes); } if (arrow != null) {