1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-27 11:42:16 -05:00

Fixed NullPointerException

This commit is contained in:
Koji Arai 2011-04-10 01:10:25 +09:00
parent 996646e33a
commit 2cd178e684

View File

@ -2375,10 +2375,12 @@ public class LocalStore extends Store implements Serializable {
String contentDisposition = MimeUtility.unfoldAndDecode(attachment.getDisposition());
String dispositionType = contentDisposition;
int pos = dispositionType.indexOf(';');
if (pos != -1) {
// extract the disposition-type, "attachment", "inline" or extension-token (see the RFC 2183)
dispositionType = dispositionType.substring(0, pos);
if (dispositionType != null) {
int pos = dispositionType.indexOf(';');
if (pos != -1) {
// extract the disposition-type, "attachment", "inline" or extension-token (see the RFC 2183)
dispositionType = dispositionType.substring(0, pos);
}
}
if (name == null && contentDisposition != null) {