Merge branch 'indexofoutboundsfix' into 'master'

Mobile: Fix IndexOutOfBoundsException bug trying to get a card that doesn't exist.

See merge request core-developers/forge!2174
This commit is contained in:
swordshine
2019-09-25 03:55:06 +00:00

View File

@@ -190,9 +190,11 @@ public abstract class VCardDisplayArea extends VDisplayArea implements ActivateH
@Override
public void setSelectedIndex(int index) {
//just scroll card into view
if (index < orderedCards.size()) {
final CardAreaPanel cardPanel = CardAreaPanel.get(orderedCards.get(index));
scrollIntoView(cardPanel);
}
}
@Override
public void activate(int index) {