From 4a89946fadfa648ef8af3491eb56eccc902d754d Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 18 Oct 2018 11:13:25 +0000 Subject: [PATCH] Fixed crash --- app/src/main/java/eu/faircode/email/ViewModelMessages.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/ViewModelMessages.java b/app/src/main/java/eu/faircode/email/ViewModelMessages.java index 348d286e..baa22ee4 100644 --- a/app/src/main/java/eu/faircode/email/ViewModelMessages.java +++ b/app/src/main/java/eu/faircode/email/ViewModelMessages.java @@ -11,10 +11,12 @@ public class ViewModelMessages extends ViewModel { } String[] getPrevNext(String thread) { + if (messages == null) + return new String[]{null, null}; + boolean found = false; TupleMessageEx prev = null; TupleMessageEx next = null; - for (int i = 0; i < messages.size(); i++) { TupleMessageEx item = messages.get(i); if (item == null)