summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Lombardo <clombardo169@gmail.com>2023-03-28 19:41:51 -0400
committerbunnei <bunneidev@gmail.com>2023-06-03 00:05:47 -0700
commitec048361af158661be4e1c35db8ac94bad5c1014 (patch)
treea418a80db24d70179d7484174503fa586dfb34fa
parentb0a434b99fbfa9052ad44b15a70c4fef99aff1e3 (diff)
android: Prevent showing games on an invalid view
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/platform/PlatformGamesFragment.kt3
1 files changed, 3 insertions, 0 deletions
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)
}