Skip to content

Commit fdbe53d

Browse files
* Is UserBrowsing should first check if last known location is non-null before checkig if last location and current locations are close
1 parent 05e9830 commit fdbe53d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/src/main/java/fr/free/nrw/commons/nearby/fragments/NearbyParentFragment.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@ private void handleLocationUpdate(fr.free.nrw.commons.location.LatLng latLng, Lo
894894
}
895895

896896
private boolean isUserBrowsing() {
897-
boolean isUserBrowsing = !presenter.areLocationsClose(getCameraTarget(), lastKnownLocation);
897+
boolean isUserBrowsing = lastKnownLocation!=null && !presenter.areLocationsClose(getCameraTarget(), lastKnownLocation);
898898
return isUserBrowsing;
899899
}
900900

0 commit comments

Comments
 (0)