Skip to content

VERY experimental Nintendo Switch 2 emulator

C++

android: Prevent updating empty game list text on invalid view

Charles Lombardo8962c3456f5c
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/platform/PlatformGamesFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/platform/PlatformGamesFragment.kt
index 775f4ed9e5..7b8d7c5a37 100644
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/platform/PlatformGamesFragment.kt
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/platform/PlatformGamesFragment.kt
@@ -99,6 +99,9 @@ class PlatformGamesFragment : Fragment(), PlatformGamesView {
}
private fun updateTextView() {
+ if (_binding == null)
+ return
+
binding.gamelistEmptyText.visibility =
if (adapter!!.itemCount == 0) View.VISIBLE else View.GONE
}