From 838bb4a93365cba25cfa2dc21b67a03b22d53c30 Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 9 May 2019 15:07:18 +0200 Subject: [PATCH] Prevent crash --- app/src/main/java/eu/faircode/email/AdapterMessage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/AdapterMessage.java b/app/src/main/java/eu/faircode/email/AdapterMessage.java index cdcf20d718..828948c68b 100644 --- a/app/src/main/java/eu/faircode/email/AdapterMessage.java +++ b/app/src/main/java/eu/faircode/email/AdapterMessage.java @@ -3172,7 +3172,7 @@ public class AdapterMessage extends RecyclerView.Adapter 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);