Fixed error handling code when trying to view a message that does not exists
This code was lost during the merge of issue4-1.x branch
This commit is contained in:
parent
115c4cb6ef
commit
04717b817a
1 changed files with 5 additions and 1 deletions
|
@ -2168,7 +2168,11 @@ public class MessagingController implements Runnable {
|
|||
LocalFolder localFolder = (LocalFolder) localStore.getFolder(folder);
|
||||
localFolder.open(OpenMode.READ_WRITE);
|
||||
|
||||
Message message = localFolder.getMessage(uid);
|
||||
LocalMessage message = (LocalMessage)localFolder.getMessage(uid);
|
||||
if (message==null
|
||||
|| message.getId()==0) {
|
||||
throw new IllegalArgumentException("Message not found: folder=" + folder + ", uid=" + uid);
|
||||
}
|
||||
|
||||
for (MessagingListener l : getListeners()) {
|
||||
l.loadMessageForViewHeadersAvailable(account, folder, uid, message);
|
||||
|
|
Loading…
Reference in a new issue