From 5a0808d989000146cf59bd540de74c3cd07ccd43 Mon Sep 17 00:00:00 2001 From: bug <45903641+inssekt@users.noreply.github.com> Date: Mon, 6 Apr 2026 00:02:52 +0100 Subject: [PATCH] Stop emulation state if initialized on destroy Ensure emulation state is stopped during destruction. --- .../java/org/citra/citra_emu/fragments/EmulationFragment.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/android/app/src/main/java/org/citra/citra_emu/fragments/EmulationFragment.kt b/src/android/app/src/main/java/org/citra/citra_emu/fragments/EmulationFragment.kt index 785438526..3724228c5 100644 --- a/src/android/app/src/main/java/org/citra/citra_emu/fragments/EmulationFragment.kt +++ b/src/android/app/src/main/java/org/citra/citra_emu/fragments/EmulationFragment.kt @@ -543,6 +543,9 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback, Choreographer.Fram } override fun onDestroy() { + if (::emulationState.isInitialized) { + emulationState.stop() + } EmulationLifecycleUtil.removeHook(onPause) EmulationLifecycleUtil.removeHook(onShutdown) if (gameFd != null) {