From 1a02eac88dadf051ffaddb049a15ec64b8141912 Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 15 Dec 2018 13:43:44 +0100 Subject: [PATCH] Prevent crash --- app/src/main/java/eu/faircode/email/FragmentMessages.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index a38c96aac7..562222ed84 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -210,9 +210,11 @@ public class FragmentMessages extends FragmentEx { db.beginTransaction(); List folders = new ArrayList<>(); - if (fid < 0) - folders.addAll(db.folder().getFoldersSynchronizingUnified()); - else { + if (fid < 0) { + List unified = db.folder().getFoldersSynchronizingUnified(); + if (unified != null) + folders.addAll(unified); + } else { EntityFolder folder = db.folder().getFolder(fid); if (folder != null) folders.add(folder);