mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 04:35:57 +00:00
Prevent crash
This commit is contained in:
parent
c7aec6e727
commit
375a97a724
1 changed files with 6 additions and 2 deletions
|
@ -574,8 +574,12 @@ class Core {
|
||||||
if (TextUtils.isEmpty(message.msgid))
|
if (TextUtils.isEmpty(message.msgid))
|
||||||
if (message.uid == null)
|
if (message.uid == null)
|
||||||
throw new IllegalArgumentException("Delete without ID");
|
throw new IllegalArgumentException("Delete without ID");
|
||||||
else
|
else {
|
||||||
imessages = new Message[]{ifolder.getMessageByUID(message.uid)};
|
Message imessage = ifolder.getMessageByUID(message.uid);
|
||||||
|
if (imessage == null)
|
||||||
|
throw new MessageRemovedException();
|
||||||
|
imessages = new Message[]{imessage};
|
||||||
|
}
|
||||||
else
|
else
|
||||||
imessages = ifolder.search(new MessageIDTerm(message.msgid));
|
imessages = ifolder.search(new MessageIDTerm(message.msgid));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue