Prevent crash

This commit is contained in:
M66B 2019-05-09 15:07:18 +02:00
parent d7ac4f486b
commit 838bb4a933
1 changed files with 1 additions and 1 deletions

View File

@ -3172,7 +3172,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
TupleMessageEx getItemAtPosition(int pos) {
PagedList<TupleMessageEx> list = getCurrentList();
if (list != null && pos < list.size()) {
if (list != null && pos >= 0 && pos < list.size()) {
TupleMessageEx message = list.get(pos);
Long key = (message == null ? null : message.id);
Log.i("Item=" + key + " @Position=" + pos);