From 7a47f40fe1bd260df285e67425ced58a7ae0289c Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 6 Oct 2018 20:30:13 +0000 Subject: [PATCH] Prevent crash --- app/src/main/java/eu/faircode/email/ServiceSynchronize.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java index 7a56c0ac..008551c8 100644 --- a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java +++ b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java @@ -1334,6 +1334,9 @@ public class ServiceSynchronize extends LifecycleService { private void doHeaders(EntityFolder folder, IMAPFolder ifolder, EntityMessage message, DB db) throws MessagingException { Message imessage = ifolder.getMessageByUID(message.uid); + if (imessage == null) + throw new MessageRemovedException(); + Enumeration
headers = imessage.getAllHeaders(); StringBuilder sb = new StringBuilder(); while (headers.hasMoreElements()) {