mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-31 22:26:06 +02:00
Prevent crash
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user