summaryrefslogtreecommitdiff
path: root/platform/android
diff options
context:
space:
mode:
authorTobrun <tobrun.van.nuland@gmail.com>2019-01-11 17:14:10 +0100
committerTobrun <tobrun@mapbox.com>2019-01-11 19:55:16 +0100
commit4db55c3ace71fcc07c3ba4de99d411bf59d46397 (patch)
tree8986205e948bb9870a076b77370034cdba6d1b75 /platform/android
parent1185fe0d316f34ebad93807e871093f9c0df0890 (diff)
downloadqtlocation-mapboxgl-4db55c3ace71fcc07c3ba4de99d411bf59d46397.tar.gz
[android] - avoid null pointer when quickly closing activity for attribution click handling
Diffstat (limited to 'platform/android')
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
index f5a31d2c6a..94f38bb2c0 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
@@ -380,7 +380,9 @@ public class MapView extends FrameLayout implements NativeMapView.ViewCallback {
*/
@UiThread
public void onStop() {
- attributionClickListener.onStop();
+ if (attributionClickListener != null) {
+ attributionClickListener.onStop();
+ }
if (mapboxMap != null) {
// map was destroyed before it was started