mirror of https://github.com/M66B/FairEmail.git
Prevent crash
This commit is contained in:
parent
8f7d13fd0d
commit
91910d6403
|
@ -255,6 +255,10 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
|
|||
}
|
||||
|
||||
void onMove(int from, int to) {
|
||||
if (from < 0 || from >= items.size() ||
|
||||
to < 0 || to >= items.size())
|
||||
return;
|
||||
|
||||
if (from < to)
|
||||
for (int i = from; i < to; i++)
|
||||
Collections.swap(items, i, i + 1);
|
||||
|
|
Loading…
Reference in New Issue