Prevent crash

This commit is contained in:
M66B 2019-05-23 10:43:49 +02:00
parent 104fa6f8c4
commit 70726f8c91
1 changed files with 7 additions and 5 deletions

View File

@ -876,11 +876,13 @@ class Core {
Log.i("End sync folder"); Log.i("End sync folder");
} }
nameFolder.put(folder.name, folder); if (!subscribed_only || subscribed) {
String parentName = folder.getParentName(separator); nameFolder.put(folder.name, folder);
if (!parentFolders.containsKey(parentName)) String parentName = folder.getParentName(separator);
parentFolders.put(parentName, new ArrayList<EntityFolder>()); if (!parentFolders.containsKey(parentName))
parentFolders.get(parentName).add(folder); parentFolders.put(parentName, new ArrayList<EntityFolder>());
parentFolders.get(parentName).add(folder);
}
} }
} }