]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Fixed assert-crash when looking up private flags for a mail being saved.
authorTimo Sirainen <tss@iki.fi>
Wed, 7 May 2014 13:41:34 +0000 (16:41 +0300)
committerTimo Sirainen <tss@iki.fi>
Wed, 7 May 2014 13:41:34 +0000 (16:41 +0300)
src/lib-storage/index/index-mail.c

index 47b243bd7bf9bfcfa12711d4d01fd2f6247343c6..be526005d97e5b5d504ac07b86a301496fdd5e1c 100644 (file)
@@ -153,6 +153,11 @@ static bool index_mail_get_pvt(struct mail *_mail)
                /* no private view (set by view syncing) -> no private flags */
                return FALSE;
        }
+       if (_mail->saving) {
+               /* mail is still being saved, it has no private flags yet */
+               return FALSE;
+       }
+       i_assert(_mail->uid != 0);
 
        index_transaction_init_pvt(_mail->transaction);
        if (!mail_index_lookup_seq(_mail->transaction->view_pvt, _mail->uid,