Browse Source

[android] added barrier for joypad overlay autohide after emulationfragment is destroyed (#3243)

This PR fixes the real culprit for the crash mentioned in #3212 (which has its value coz it fixes other layout's minor navigation issues)
The reason was not the carousel, but the joypad overlay autohide instead.

To reproduce the crash, just enable autohide, launch the game, and leave before overlay gets hidden. eden should crash in few seconds.
The fix was adding barriers to ensure fragment is currently attached to its activity and the binding is not null.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3243
Reviewed-by: Maufeat <sahyno1996@gmail.com>
Reviewed-by: DraVee <dravee@eden-emu.dev>
Co-authored-by: xbzk <xbzk@eden-emu.dev>
Co-committed-by: xbzk <xbzk@eden-emu.dev>
remove-unused-fastmem-fallback
xbzk 18 hours ago
committed by crueter
parent
commit
80327312dd
No known key found for this signature in database GPG Key ID: 425ACD2D4830EBC6
  1. 2
      src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt

2
src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt

@ -1989,7 +1989,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
handler.removeCallbacksAndMessages(null)
handler.postDelayed({
if (isOverlayVisible) {
if (isOverlayVisible && isAdded && _binding != null) {
hideOverlay()
}
}, seconds * 1000L)

Loading…
Cancel
Save