diff --git a/j-lawyer-client/src/com/jdimension/jlawyer/client/mail/FolderContainer.java b/j-lawyer-client/src/com/jdimension/jlawyer/client/mail/FolderContainer.java index 694f0227..95b50b1b 100755 --- a/j-lawyer-client/src/com/jdimension/jlawyer/client/mail/FolderContainer.java +++ b/j-lawyer-client/src/com/jdimension/jlawyer/client/mail/FolderContainer.java @@ -753,8 +753,10 @@ public int getUnreadMessageCount() { this.cachedTotal = this.folder.getMessageCount(); } catch (StoreClosedException stex) { log.warn("Unable to determine number of unread messages - folder is closed"); + return Math.max(this.cachedUnread, 0); } catch (MessagingException ex) { log.error("Unable to determine number of unread messages", ex); + return Math.max(this.cachedUnread, 0); } }