Преглед на файлове

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
     }