Prevent crash

This commit is contained in:
M66B 2018-12-15 13:43:44 +01:00
parent 754d28ea13
commit 1a02eac88d
1 changed files with 5 additions and 3 deletions

View File

@ -210,9 +210,11 @@ public class FragmentMessages extends FragmentEx {
db.beginTransaction();
List<EntityFolder> folders = new ArrayList<>();
if (fid < 0)
folders.addAll(db.folder().getFoldersSynchronizingUnified());
else {
if (fid < 0) {
List<EntityFolder> unified = db.folder().getFoldersSynchronizingUnified();
if (unified != null)
folders.addAll(unified);
} else {
EntityFolder folder = db.folder().getFolder(fid);
if (folder != null)
folders.add(folder);