From 0405631a163cb604653f6cf42ceff7d1d5696faa Mon Sep 17 00:00:00 2001 From: Alexander Sytnyk Date: Fri, 20 Oct 2017 12:03:32 +0300 Subject: [PATCH] Fix NPE --- .../osmand/plus/mapmarkers/MapMarkerSelectionFragment.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkerSelectionFragment.java b/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkerSelectionFragment.java index c1f0dd42d7..5fbf6a084d 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkerSelectionFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkerSelectionFragment.java @@ -72,7 +72,11 @@ public class MapMarkerSelectionFragment extends BaseOsmAndDialogFragment { LatLon myLoc = l == null ? null : new LatLon(l.getLatitude(), l.getLongitude()); useCenter = !mapLinked; loc = (useCenter ? mw : myLoc); - heading = useCenter ? -mapRotation : head; + if (useCenter) { + heading = -mapRotation; + } else { + heading = head; + } } } nightMode = !app.getSettings().isLightContent();