From b5b4e50c32364ed1cd5c56f70a055cf8b20b1837 Mon Sep 17 00:00:00 2001 From: bunnei Date: Sat, 18 Mar 2023 21:28:22 -0700 Subject: [PATCH] android: EmulationActivity: Fix variable shadowing in fragment creation. --- .../java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt index cbec4836b..44d002016 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt @@ -72,12 +72,12 @@ open class EmulationActivity : AppCompatActivity() { setContentView(R.layout.activity_emulation) // Find or create the EmulationFragment - var emulationFragment = + emulationFragment = supportFragmentManager.findFragmentById(R.id.frame_emulation_fragment) as EmulationFragment? if (emulationFragment == null) { emulationFragment = EmulationFragment.newInstance(path) supportFragmentManager.beginTransaction() - .add(R.id.frame_emulation_fragment, emulationFragment) + .add(R.id.frame_emulation_fragment, emulationFragment!!) .commit() } title = selectedTitle