1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-29 11:15:51 +00:00

Prevent crash

This commit is contained in:
M66B 2019-05-04 19:01:17 +02:00
parent c7aec6e727
commit 375a97a724

View file

@ -574,8 +574,12 @@ class Core {
if (TextUtils.isEmpty(message.msgid))
if (message.uid == null)
throw new IllegalArgumentException("Delete without ID");
else
imessages = new Message[]{ifolder.getMessageByUID(message.uid)};
else {
Message imessage = ifolder.getMessageByUID(message.uid);
if (imessage == null)
throw new MessageRemovedException();
imessages = new Message[]{imessage};
}
else
imessages = ifolder.search(new MessageIDTerm(message.msgid));