summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCharles Lombardo <clombardo169@gmail.com>2023-09-27 02:13:12 +0200
committerCharles Lombardo <clombardo169@gmail.com>2023-09-27 19:40:09 +0200
commit22284fc5041b7ad307b50811cd11e6e4d5dbc926 (patch)
tree11c8e59cbbadb94aa5a64b6e8987d141733e42e9
parentandroid: Prevent setup fragment crash in background (diff)
downloadyuzu-22284fc5041b7ad307b50811cd11e6e4d5dbc926.tar
yuzu-22284fc5041b7ad307b50811cd11e6e4d5dbc926.tar.gz
yuzu-22284fc5041b7ad307b50811cd11e6e4d5dbc926.tar.bz2
yuzu-22284fc5041b7ad307b50811cd11e6e4d5dbc926.tar.lz
yuzu-22284fc5041b7ad307b50811cd11e6e4d5dbc926.tar.xz
yuzu-22284fc5041b7ad307b50811cd11e6e4d5dbc926.tar.zst
yuzu-22284fc5041b7ad307b50811cd11e6e4d5dbc926.zip
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/SetupFragment.kt8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/SetupFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/SetupFragment.kt
index 6bb6a4464..c66bb635a 100644
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/SetupFragment.kt
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/SetupFragment.kt
@@ -355,11 +355,15 @@ class SetupFragment : Fragment() {
}
fun pageForward() {
- binding.viewPager2.currentItem = binding.viewPager2.currentItem + 1
+ if (_binding != null) {
+ binding.viewPager2.currentItem += 1
+ }
}
fun pageBackward() {
- binding.viewPager2.currentItem = binding.viewPager2.currentItem - 1
+ if (_binding != null) {
+ binding.viewPager2.currentItem -= 1
+ }
}
fun setPageWarned(page: Int) {