From b8a82d575599cfb2364e19150070031be9297d97 Mon Sep 17 00:00:00 2001 From: Brad Leege Date: Wed, 5 Aug 2015 18:21:34 -0500 Subject: [PATCH] #1940 -Adding Null Check due to DRY initialization --- .../src/main/java/com/mapbox/mapboxgl/views/MapView.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/android/java/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxgl/views/MapView.java b/android/java/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxgl/views/MapView.java index 303ccd9daf8..ed2038c2401 100644 --- a/android/java/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxgl/views/MapView.java +++ b/android/java/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxgl/views/MapView.java @@ -1654,7 +1654,9 @@ private void updateMap() { } */ } else { - mGpsMarker.setVisibility(View.INVISIBLE); + if (mGpsMarker != null) { + mGpsMarker.setVisibility(View.INVISIBLE); + } } } }