[android] - avoid null pointer if map wasn't initalised when saving instance state
This commit is contained in:
@@ -329,8 +329,10 @@ public class MapView extends FrameLayout {
|
||||
*/
|
||||
@UiThread
|
||||
public void onSaveInstanceState(@NonNull Bundle outState) {
|
||||
outState.putBoolean(MapboxConstants.STATE_HAS_SAVED_STATE, true);
|
||||
mapboxMap.onSaveInstanceState(outState);
|
||||
if (mapboxMap != null) {
|
||||
outState.putBoolean(MapboxConstants.STATE_HAS_SAVED_STATE, true);
|
||||
mapboxMap.onSaveInstanceState(outState);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user