Fix IllegalStateException in destroySurface method

Signed-off-by: DevarshVasani <vasanidevarsh@gmail.com>
This commit is contained in:
Devarsh Chintanbhai Vasani 2025-03-05 17:24:30 +05:30
parent 10e7749f2f
commit 619b64e0e9

View file

@ -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()