From 62c47011a01208ff18fd69ff85c8313290ad7082 Mon Sep 17 00:00:00 2001 From: Charles Lombardo Date: Sun, 23 Apr 2023 18:46:42 -0400 Subject: [PATCH] android: Prevent situation where binding is called on a null view --- .../app/src/main/java/org/yuzu/yuzu_emu/ui/GamesFragment.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/GamesFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/GamesFragment.kt index 759ff18fc..fb8c0fd32 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/GamesFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/GamesFragment.kt @@ -140,6 +140,9 @@ class GamesFragment : Fragment() { // Make sure the loading indicator appears even if the layout is told to refresh before being fully drawn binding.swipeRefresh.post { + if (_binding == null) { + return@post + } binding.swipeRefresh.isRefreshing = gamesViewModel.isReloading.value!! } }