Skip to content

Commit

Permalink
Fix #445 stop listening for updates before stopping/destroying the view
Browse files Browse the repository at this point in the history
  • Loading branch information
kuhnroyal committed Jun 9, 2024
1 parent 8e35f0a commit cae6692
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1770,15 +1770,17 @@ private void destroyMapViewIfNecessary() {
if (mapView == null) {
return;
}
mapViewContainer.removeView(mapView);
mapView.onStop();
mapView.onDestroy();

if (locationComponent != null) {
locationComponent.setLocationComponentEnabled(false);
}
stopListeningForLocationUpdates();

mapViewContainer.removeView(mapView);

mapView.onStop();
mapView.onDestroy();

mapView = null;
}

Expand Down

0 comments on commit cae6692

Please sign in to comment.