Mercurial > dovecot > original-hg > dovecot-1.2
changeset 5181:922672fcdfdc HEAD
Crashfix in error conditions.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 22 Feb 2007 15:45:42 +0200 |
parents | 8e8b1ad19ad1 |
children | 52389cd2c474 |
files | src/lib-index/mail-cache-transaction.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-index/mail-cache-transaction.c Thu Feb 22 15:39:15 2007 +0200 +++ b/src/lib-index/mail-cache-transaction.c Thu Feb 22 15:45:42 2007 +0200 @@ -69,7 +69,8 @@ static void mail_cache_transaction_reset(struct mail_cache_transaction_ctx *ctx) { - ctx->cache_file_seq = ctx->cache->hdr->file_seq; + ctx->cache_file_seq = MAIL_CACHE_IS_UNUSABLE(ctx->cache) ? 0 : + ctx->cache->hdr->file_seq; if (ctx->cache_data) buffer_set_used_size(ctx->cache_data, 0);