mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2024-11-26 06:15:43 +01:00
android: Prevent setup fragment crash in background
Sometimes during onSaveInstanceState, the SetupFragment would crash the app in the background if we tried to store the state of a view.
This commit is contained in:
parent
ec388622ff
commit
d70f18b87b
@ -295,8 +295,10 @@ class SetupFragment : Fragment() {
|
||||
|
||||
override fun onSaveInstanceState(outState: Bundle) {
|
||||
super.onSaveInstanceState(outState)
|
||||
if (_binding != null) {
|
||||
outState.putBoolean(KEY_NEXT_VISIBILITY, binding.buttonNext.isVisible)
|
||||
outState.putBoolean(KEY_BACK_VISIBILITY, binding.buttonBack.isVisible)
|
||||
}
|
||||
outState.putBooleanArray(KEY_HAS_BEEN_WARNED, hasBeenWarned)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user