Prevent crash

This commit is contained in:
M66B 2019-10-11 08:25:04 +02:00
parent dfaff06b6b
commit 76581cbfe6
1 changed files with 6 additions and 4 deletions

View File

@ -2201,11 +2201,12 @@ class Core {
Log.i(folder.name + " inline downloaded message id=" + message.id +
" size=" + message.size + "/" + (body == null ? null : body.length()));
if (!TextUtils.isEmpty(body))
fixAttachments(context, message.id, body);
Long size = parts.getBodySize();
if (TextUtils.isEmpty(body) && size != null && size > 0)
reportEmptyMessage(context, account, istore);
else
fixAttachments(context, message.id, body);
}
}
@ -2525,11 +2526,12 @@ class Core {
Log.i(folder.name + " downloaded message id=" + message.id +
" size=" + message.size + "/" + (body == null ? null : body.length()));
if (!TextUtils.isEmpty(body))
fixAttachments(context, message.id, body);
Long size = parts.getBodySize();
if (TextUtils.isEmpty(body) && size != null && size > 0)
reportEmptyMessage(context, account, istore);
else
fixAttachments(context, message.id, body);
}
}