From dd130c2132bb5e37f67315c88c656b78f8872474 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Mon, 22 Mar 2021 12:09:22 +1000 Subject: [PATCH] Android: Fix possible crash in memory card editor --- .../github/stenzek/duckstation/MemoryCardEditorActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/app/src/main/java/com/github/stenzek/duckstation/MemoryCardEditorActivity.java b/android/app/src/main/java/com/github/stenzek/duckstation/MemoryCardEditorActivity.java index 87bf6c3e2..76953c75a 100644 --- a/android/app/src/main/java/com/github/stenzek/duckstation/MemoryCardEditorActivity.java +++ b/android/app/src/main/java/com/github/stenzek/duckstation/MemoryCardEditorActivity.java @@ -242,7 +242,7 @@ public class MemoryCardEditorActivity extends AppCompatActivity { if (cards.isEmpty()) return; - if (newSelection < 0) { + if (newSelection < 0 || newSelection >= tabLayout.getTabCount()) { if (oldPos < cards.size()) tabLayout.getTabAt(oldPos).select(); else