# HG changeset patch # User Timo Sirainen # Date 1042328542 -7200 # Node ID 1fd572d68422490e962c75decd5a7c1764ef87bd # Parent f7d0209bb7a62d273b7e3d8b1b85e6f618c2538a If we couldn't get message_part for any reason, don't crash. diff -r f7d0209bb7a6 -r 1fd572d68422 src/lib-imap/imap-message-cache.c --- a/src/lib-imap/imap-message-cache.c Sun Jan 12 01:13:36 2003 +0200 +++ b/src/lib-imap/imap-message-cache.c Sun Jan 12 01:42:22 2003 +0200 @@ -314,9 +314,8 @@ failed = msg->part == NULL; } - if ((fields & IMAP_CACHE_MESSAGE_BODY_SIZE) && msg->body_size == NULL) { - i_assert(msg->part != NULL); - + if ((fields & IMAP_CACHE_MESSAGE_BODY_SIZE) && + msg->body_size == NULL && msg->part != NULL) { msg->body_size = p_new(msg->pool, struct message_size, 1); if (msg->hdr_size == NULL) { msg->hdr_size = p_new(msg->pool,