Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[android] - fix null pointer on trackingsettings
Browse files Browse the repository at this point in the history
  • Loading branch information
tobrun committed Dec 21, 2016
1 parent a6b1773 commit 0c1fd17
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,9 @@ public void setBearing(double bearing) {
this.bearing = bearing;
if (myLocationTrackingMode == MyLocationTracking.TRACKING_NONE) {
if (myBearingTrackingMode == MyBearingTracking.GPS) {
setCompass(location.getBearing() - bearing);
if (location != null) {
setCompass(location.getBearing() - bearing);
}
} else if (myBearingTrackingMode == MyBearingTracking.COMPASS) {
setCompass(magneticHeading - bearing);
}
Expand Down

0 comments on commit 0c1fd17

Please sign in to comment.