From 40c831ab93d0333a5fa3bb8ef26d30b08ac5875d Mon Sep 17 00:00:00 2001 From: Nathan Whitehorn Date: Sun, 7 Nov 2004 21:50:46 +0000 Subject: [PATCH] Fixed a crashing bug that would occur if mails were placed during an IMAP session in the root hierarchy of the IMAP directory structure with a non-NULL mailbox root prefix git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9837 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/mail/RemoteStorageProtocol.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/kits/mail/RemoteStorageProtocol.cpp b/src/kits/mail/RemoteStorageProtocol.cpp index aa1cf48508..3843431e88 100644 --- a/src/kits/mail/RemoteStorageProtocol.cpp +++ b/src/kits/mail/RemoteStorageProtocol.cpp @@ -177,6 +177,9 @@ class UpdateHandler : public BHandler { if (dir == NULL) dir = ""; + + if (!_prot->mailboxes.HasItem(dir)) + break; { node_ref item_ref; @@ -315,6 +318,9 @@ void BRemoteMailStorageProtocol::SyncMailbox(const char *mailbox) { uint32 chain; bool append; + if (!mailboxes.HasItem(mailbox)) + return; // -- Basic Sanity Checking + while (folder.GetNextEntry(&entry) == B_OK) { if (!entry.IsFile()) continue;