From 9cb7e7072d2d2ce3e1e3e19fe086739acdefa8f6 Mon Sep 17 00:00:00 2001 From: Charles Lombardo Date: Thu, 23 Mar 2023 08:54:16 -0400 Subject: android: Prevent updating empty game list text on invalid view --- .../main/java/org/yuzu/yuzu_emu/ui/platform/PlatformGamesFragment.kt | 3 +++ 1 file changed, 3 insertions(+) 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 775f4ed9e..7b8d7c5a3 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 } -- cgit v1.2.3