mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-26 23:55:40 +00:00
Android: Fix possible crash in memory card editor
This commit is contained in:
parent
4c3d2cd3fe
commit
dd130c2132
|
@ -242,7 +242,7 @@ public class MemoryCardEditorActivity extends AppCompatActivity {
|
||||||
if (cards.isEmpty())
|
if (cards.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (newSelection < 0) {
|
if (newSelection < 0 || newSelection >= tabLayout.getTabCount()) {
|
||||||
if (oldPos < cards.size())
|
if (oldPos < cards.size())
|
||||||
tabLayout.getTabAt(oldPos).select();
|
tabLayout.getTabAt(oldPos).select();
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue