From 6524591d892a03228f06ff237cb572fb7c1568d8 Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 2 Oct 2021 16:32:13 +0200 Subject: [PATCH] Added fail-safe for empty folder list --- app/src/main/java/eu/faircode/email/Core.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index 10c6bde36b..c44aaeda72 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -2120,6 +2120,11 @@ class Core { " subscriptions=" + subscription.size() + " fetched in " + duration + " ms"); + if (ifolders.size() == 0) { + Log.e(account.host + " no folders listed"); + return; + } + // Check if system folders were renamed try { for (Pair ifolder : ifolders) {