diff options
author | Pablo Guardiola <guardiola31337@gmail.com> | 2017-06-01 14:10:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-01 14:10:18 +0200 |
commit | b2f277ac620cc41883dad8e06bb45458c18ffe72 (patch) | |
tree | 1153389863c5f1e6eed6f8af3ec9d87bb4f6be53 /platform | |
parent | 52eba423aecca51dd65c15d2d3dbffe2f06856ba (diff) | |
download | qtlocation-mapboxgl-b2f277ac620cc41883dad8e06bb45458c18ffe72.tar.gz |
add null check in custom location engine activity to prevent null pointer exception (#9159)
Diffstat (limited to 'platform')
-rw-r--r-- | platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/userlocation/MockLocationEngine.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/userlocation/MockLocationEngine.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/userlocation/MockLocationEngine.java index b87c723fda..b02b35b0d0 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/userlocation/MockLocationEngine.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/userlocation/MockLocationEngine.java @@ -63,7 +63,9 @@ public class MockLocationEngine extends LocationEngine { @Override public void removeLocationUpdates() { - handler.removeCallbacksAndMessages(null); + if (handler != null) { + handler.removeCallbacksAndMessages(null); + } } private Location getNextLocation() { |