Commit 5fe41bf1 authored by Mickaël Guessant's avatar Mickaël Guessant

IMAP: make sure we never return null even with broken 0 uid message

git-svn-id: https://svn.code.sf.net/p/davmail/code/trunk@2487 3d1905a2-6b24-0410-a738-b14d5a86fcbd
parent 175db367
......@@ -2005,7 +2005,10 @@ public abstract class ExchangeSession {
public void loadMimeMessage() throws IOException, MessagingException {
if (mimeMessage == null) {
// try to get message content from cache
if (this.imapUid == messageList.cachedMessageImapUid) {
if (this.imapUid == messageList.cachedMessageImapUid
// make sure we never return null even with broken 0 uid message
&& messageList.cachedMimeContent != null
&& messageList.cachedMimeMessage != null) {
mimeContent = messageList.cachedMimeContent;
mimeMessage = messageList.cachedMimeMessage;
LOGGER.debug("Got message content for " + imapUid + " from cache");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment