mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-02-04 02:51:18 +01:00
[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>
This commit is contained in:
@@ -1989,7 +1989,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
||||
handler.removeCallbacksAndMessages(null)
|
||||
|
||||
handler.postDelayed({
|
||||
if (isOverlayVisible) {
|
||||
if (isOverlayVisible && isAdded && _binding != null) {
|
||||
hideOverlay()
|
||||
}
|
||||
}, seconds * 1000L)
|
||||
|
||||
Reference in New Issue
Block a user