summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorPablo Guardiola <guardiola31337@gmail.com>2017-06-01 14:10:18 +0200
committerGitHub <noreply@github.com>2017-06-01 14:10:18 +0200
commitb2f277ac620cc41883dad8e06bb45458c18ffe72 (patch)
tree1153389863c5f1e6eed6f8af3ec9d87bb4f6be53 /platform
parent52eba423aecca51dd65c15d2d3dbffe2f06856ba (diff)
downloadqtlocation-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.java4
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() {