diff --git a/android/app/src/main/java/app/organicmaps/MapFragment.java b/android/app/src/main/java/app/organicmaps/MapFragment.java index 958aa564f2..99a50d7a87 100644 --- a/android/app/src/main/java/app/organicmaps/MapFragment.java +++ b/android/app/src/main/java/app/organicmaps/MapFragment.java @@ -43,7 +43,8 @@ public class MapFragment extends BaseMwmFragment implements View.OnTouchListener public void destroySurface() { - mMap.onSurfaceDestroyed(requireActivity().isChangingConfigurations(), isAdded()); + if (getActivity() != null) + mMap.onSurfaceDestroyed(getActivity().isChangingConfigurations(), isAdded()); } public boolean isContextCreated()