Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Commit af90446

Browse files
committed
[android] - null check mapboxMap with onStop invocation
1 parent 6dfe4ff commit af90446

File tree

1 file changed

+4
-1
lines changed
  • platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps

1 file changed

+4
-1
lines changed

platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,10 @@ public void onPause() {
369369
*/
370370
@UiThread
371371
public void onStop() {
372-
mapboxMap.onStop();
372+
if (mapboxMap != null) {
373+
// map was destroyed before it was started
374+
mapboxMap.onStop();
375+
}
373376
ConnectivityReceiver.instance(getContext()).deactivate();
374377
FileSource.getInstance(getContext()).deactivate();
375378
}

0 commit comments

Comments
 (0)