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

Commit

Permalink
[android] - handle destroying activity programmatically as part of th…
Browse files Browse the repository at this point in the history
…eme switching (#10589)
  • Loading branch information
tobrun committed Dec 5, 2017
1 parent 05f0ba4 commit fbd451a
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,12 @@ public void onStop() {
public void onDestroy() {
destroyed = true;
mapCallback.clearOnMapReadyCallbacks();
nativeMapView.destroy();
nativeMapView = null;

if (nativeMapView != null) {
// null when destroying an activity programmatically mapbox-navigation-android/issues/503
nativeMapView.destroy();
nativeMapView = null;
}

if (mapRenderer != null) {
mapRenderer.onDestroy();
Expand Down

0 comments on commit fbd451a

Please sign in to comment.