fixed NPE in MapMarkersWidgetsFactory

This commit is contained in:
Chumva 2018-03-05 11:13:39 +02:00
parent 3959d2615d
commit 5d7fa35a19

View file

@ -216,7 +216,10 @@ public class MapMarkersWidgetsFactory {
} }
boolean mapLinkedToLoc = map.getMapViewTrackingUtilities().isMapLinkedToLocation(); boolean mapLinkedToLoc = map.getMapViewTrackingUtilities().isMapLinkedToLocation();
Float heading = !mapLinkedToLoc ? 0f : map.getMapViewTrackingUtilities().getHeading(); Float heading = 0f;
if (mapLinkedToLoc) {
heading = map.getMapViewTrackingUtilities().getHeading();
}
MapMarker marker = markers.get(0); MapMarker marker = markers.get(0);
updateUI(loc, heading, marker, arrowImg, distText, okButton, addressText, true, customLocation != null); updateUI(loc, heading, marker, arrowImg, distText, okButton, addressText, true, customLocation != null);