Describe the bug
When I return Back while the RainViewer animation is playing, the app crashes.
How to Reproduce
Steps to reproduce the behavior:
Open the app.
Tap the map icon at the top right, to open the RainViewer map.
Press Play.
Press the Back button at the top left.
FATAL EXCEPTION: main
Process: org.woheller69.omweather, PID: 15985
java.lang.NullPointerException: Attempt to invoke virtual method 'org.osmdroid.views.MapViewRepository org.osmdroid.views.MapView.getRepository()' on a null object reference
at org.osmdroid.views.overlay.infowindow.InfoWindow.<init>(InfoWindow.java:53)
at org.osmdroid.views.overlay.infowindow.BasicInfoWindow.<init>(BasicInfoWindow.java:54)
at org.osmdroid.views.overlay.infowindow.MarkerInfoWindow.<init>(MarkerInfoWindow.java:41)
at org.osmdroid.views.MapViewRepository.getDefaultMarkerInfoWindow(MapViewRepository.java:55)
at org.osmdroid.views.overlay.Marker.<init>(Marker.java:116)
at org.osmdroid.views.overlay.Marker.<init>(Marker.java:93)
at org.woheller69.weather.activities.RainViewerActivity.replaceLayer(RainViewerActivity.java:320)
at org.woheller69.weather.activities.RainViewerActivity.showFrame(RainViewerActivity.java:255)
at org.woheller69.weather.activities.RainViewerActivity$1.lambda$run$0$org-woheller69-weather-activities-RainViewerActivity$1(RainViewerActivity.java:221)
at org.woheller69.weather.activities.RainViewerActivity$1$$ExternalSyntheticLambda0.run(D8$$SyntheticClass)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6816)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1563)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1451)
Expected behavior
The app does not crash.
Environment (please complete the following information):
Version 2.8 from F-droid on Samsung Android 7.1.
I could not reproduce on another phone with Samsung Android 11.
Describe the bug When I return Back while the RainViewer animation is playing, the app crashes.
How to Reproduce Steps to reproduce the behavior:
Expected behavior The app does not crash.
Environment (please complete the following information): Version 2.8 from F-droid on Samsung Android 7.1.
I could not reproduce on another phone with Samsung Android 11.