Skip to content

Commit

Permalink
Protect against null Location in FusedLocationSource (react-native-ma…
Browse files Browse the repository at this point in the history
…ps#3345)

* protect against null location in map view

* Update FusedLocationSource.java

Co-authored-by: Christopher Dro <[email protected]>
  • Loading branch information
netshade and christopherdro authored Mar 17, 2020
1 parent 09ba92c commit eeb13bf
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ public void activate(final OnLocationChangedListener onLocationChangedListener)
fusedLocationClientProviderClient.getLastLocation().addOnSuccessListener(new OnSuccessListener<Location>() {
@Override
public void onSuccess(Location location) {
onLocationChangedListener.onLocationChanged(location);
if (location != null) {
onLocationChangedListener.onLocationChanged(location);
}
}
});
locationCallback = new LocationCallback() {
Expand Down

0 comments on commit eeb13bf

Please sign in to comment.