From e7c85ff1029e1e01740613c2de2766e609195d84 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sat, 30 Apr 2016 01:27:27 +0300 Subject: [PATCH] quota: Fix to earlier commit 62f2f6baf expunge_uids may become empty with prev_idx > 0 --- src/plugins/quota/quota-storage.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/quota/quota-storage.c b/src/plugins/quota/quota-storage.c index 34a6c21f47..bd65663b53 100644 --- a/src/plugins/quota/quota-storage.c +++ b/src/plugins/quota/quota-storage.c @@ -341,7 +341,8 @@ static void quota_mailbox_sync_notify(struct mailbox *box, uint32_t uid, try and get the message sizes at this point. Rely on sizes that we saved earlier, or recalculate the whole quota if we don't know the size. */ - if (!array_is_created(&qbox->expunge_uids)) { + if (!array_is_created(&qbox->expunge_uids) || + array_is_empty(&qbox->expunge_uids)) { i = count = 0; } else { uids = array_get(&qbox->expunge_uids, &count);