diff --git a/src/com/android/email/mail/store/ImapStore.java b/src/com/android/email/mail/store/ImapStore.java index e150ad4da..d8a303b5a 100644 --- a/src/com/android/email/mail/store/ImapStore.java +++ b/src/com/android/email/mail/store/ImapStore.java @@ -679,8 +679,11 @@ public class ImapStore extends Store { for (Object o : fp) { if (o instanceof Part) { Part part = (Part) o; - String partId = part.getHeader(MimeHeader.HEADER_ANDROID_ATTACHMENT_STORE_DATA)[0]; - fetchFields.add("BODY.PEEK[" + partId + "]"); + String[] partIds = + part.getHeader(MimeHeader.HEADER_ANDROID_ATTACHMENT_STORE_DATA); + if (partIds != null) { + fetchFields.add("BODY.PEEK[" + partIds[0] + "]"); + } } }