From 8917609d0e1437302df22c228c515ee0b31b76f3 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 28 Sep 2021 14:34:00 +0200 Subject: [PATCH] Fixed crash --- app/src/main/java/eu/faircode/email/FragmentMessages.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index 70639137e4..d895caca1b 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -5192,13 +5192,13 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. @Override public void onLoading() { loading = true; - updateListState("Loading", SimpleTask.getCount(), adapter.getItemCount()); + updateListState("Loading", SimpleTask.getCount(), adapter == null ? 0 : adapter.getItemCount()); } @Override public void onLoaded(int found) { loading = false; - updateListState("Loaded found=" + found, SimpleTask.getCount(), adapter.getItemCount() + found); + updateListState("Loaded found=" + found, SimpleTask.getCount(), adapter == null ? 0 : adapter.getItemCount() + found); } @Override