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

Commit

Permalink
[android] - avoid null pointer if map wasn't initalised when saving i…
Browse files Browse the repository at this point in the history
…nstance state
  • Loading branch information
tobrun committed Oct 30, 2017
1 parent 5893af7 commit b8d5798
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,10 @@ public void run() {
*/
@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);
}
}

/**
Expand Down

0 comments on commit b8d5798

Please sign in to comment.