瀏覽代碼

android: Prevent updating empty game list text on invalid view

Charles Lombardo 3 年之前
父節點
當前提交
9cb7e7072d
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/platform/PlatformGamesFragment.kt

+ 3 - 0
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
     }