You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 20, 2024. It is now read-only.
This repository was archived by the owner on Nov 20, 2024. It is now read-only.
MyLocationNewOverlay#disableFollowLocation and MyLocationNewOverlay#disableMyLocation throw NullPointerException if called after MyLocationNewOverlay#onDetach#1783
Description and/or steps/code to reproduce the problem
I found this due to having some code that class disableMyLocation/disableFollowLocation in the onPause of a Fragment. For normal Fragment classes this is fine, but interestingly when using a DialogFragmentView#onDetachedFromWindow (which from the MapView will eventually call onDetach on its overlays) is called for views before onPause when DialogFragment#dismiss is called. This means that onPause that tries to clean up MyLocationNewOverlay explodes in a DialogFragment as disableMyLocation and disableFollowLocation both make unchecked calls to the mMapController that has been set to null by onDetach.
I wrote an Android instrumentation test that demonstrates this: