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 6, 2017
1 parent 8ad3759 commit bc27322
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 bc27322

Please sign in to comment.