Description
Describe the bug
The app crashed due to a NullPointerException when launching MainActivity.
To Reproduce
(Possible) Steps to reproduce the behavior:
① Open the app and go to the Leak Management page.
② Tap a button that triggers a dialog (DialogFragment) to appear.
③ Without closing the dialog, perform one of the following actions:
③a Press the Home button to send the app to the background.
③b Rotate the screen (portrait ↔ landscape).
③c Switch the app to dark mode or change the theme.
④ Return to the app (or let the system automatically restart it).
The app crashes at this point: because the DialogFragment is restored, but the Dialog is null.
Expected behavior
It should not crash.
Screenshots





Smartphone (please complete the following information):
- Google Pixel 9 pro
-Android 9 - No
- Version: 3.10
Additional context
Since I don't know how to access the Leak Management page, I'm not entirely sure about the exact reproduction steps. This is my inference based on the previous crash scenario and the error log.