From ec048361af158661be4e1c35db8ac94bad5c1014 Mon Sep 17 00:00:00 2001 From: Charles Lombardo Date: Tue, 28 Mar 2023 19:41:51 -0400 Subject: android: Prevent showing games on an invalid view --- .../main/java/org/yuzu/yuzu_emu/ui/platform/PlatformGamesFragment.kt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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 998a00847..dcfac1b2a 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 @@ -75,6 +75,9 @@ class PlatformGamesFragment : Fragment(), PlatformGamesView { } override fun showGames(games: Cursor) { + if (_binding == null) + return + if (binding.gridGames.adapter != null) { (binding.gridGames.adapter as GameAdapter).swapCursor(games) } -- cgit v1.2.3