Skip to content

Commit

Permalink
Fixed NullPointerException
Browse files Browse the repository at this point in the history
  • Loading branch information
jca02266 committed Apr 9, 2011
1 parent 996646e commit 2cd178e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/com/fsck/k9/mail/store/LocalStore.java
Expand Up @@ -2375,10 +2375,12 @@ public Void doDbWork(final SQLiteDatabase db) throws WrappedException, Unavailab
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) {
Expand Down

0 comments on commit 2cd178e

Please sign in to comment.