avoid NPE
This commit is contained in:
parent
70930ba5c2
commit
7cd99765f5
2 changed files with 2 additions and 2 deletions
|
@ -507,7 +507,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
|
|||
|
||||
@Override
|
||||
public void updateCompassValue(float value) {
|
||||
float lastHeading = heading;
|
||||
float lastHeading = heading != null ? heading : 99;
|
||||
heading = value;
|
||||
if (heading != null && Math.abs(MapUtils.degreesDiff(lastHeading, heading)) > 5) {
|
||||
amenityAdapter.notifyDataSetChanged();
|
||||
|
|
|
@ -182,7 +182,7 @@ public class DashFavoritesFragment extends DashBaseFragment {
|
|||
public void updateCompassValue(float value) {
|
||||
//heading = value;
|
||||
//updateArrows();
|
||||
float lastHeading = heading;
|
||||
float lastHeading = heading != null ? heading : 99;
|
||||
heading = value;
|
||||
if (heading != null && Math.abs(MapUtils.degreesDiff(lastHeading, heading)) > 5) {
|
||||
updateArrows();
|
||||
|
|
Loading…
Reference in a new issue