diff options
author | Aleksandr Zatsepin <alexzatsepin@users.noreply.github.com> | 2017-02-06 13:37:13 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-06 13:37:13 +0300 |
commit | 6be72e5ebf9561c1b0ce8dcb374ba7b4a000f0d3 (patch) | |
tree | db1b67a6789f4b2a8c640a014d16208570b26967 | |
parent | 251337583f9bdc0948a3d64957ae3d3f7bcc154f (diff) | |
parent | 2f3533d736c94dd97bc9a1c8e6021e4af64aa314 (diff) |
Merge pull request #5361 from alexzatsepin/MAPSME-3807-fixed-npe-in-android-native-providerbeta-640beta-639beta-637beta-636beta-635beta-633beta-630beta-628beta-625beta-620beta-619beta-616beta-615beta-613
[android] Fixed NPE in AndroidNativeProvider wile coming back from ba…
-rw-r--r-- | android/src/com/mapswithme/maps/location/AndroidNativeProvider.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/android/src/com/mapswithme/maps/location/AndroidNativeProvider.java b/android/src/com/mapswithme/maps/location/AndroidNativeProvider.java index ded0089ac5..af3a618cce 100644 --- a/android/src/com/mapswithme/maps/location/AndroidNativeProvider.java +++ b/android/src/com/mapswithme/maps/location/AndroidNativeProvider.java @@ -53,7 +53,7 @@ class AndroidNativeProvider extends BaseLocationProvider Location location = findBestNotExpiredLocation(mLocationManager, providers, LocationUtils.LOCATION_EXPIRATION_TIME_MILLIS_SHORT); - if (!getLocationFixChecker().isLocationBetterThanLast(location)) + if (location != null && !getLocationFixChecker().isLocationBetterThanLast(location)) { location = LocationHelper.INSTANCE.getSavedLocation(); if (location == null || LocationUtils.isExpired(location, LocationHelper.INSTANCE.getSavedLocationTime(), |