am 5c93d366
: Merge "Fix NPE in uiSaveDraftMessage" into ub-mail-master
* commit '5c93d3661603843d6bc0b9084a2633c7e3d08ab9': Fix NPE in uiSaveDraftMessage
This commit is contained in:
commit
fc1eecd7a8
@ -4887,11 +4887,12 @@ public class EmailProvider extends ContentProvider
|
||||
final Mailbox mailbox =
|
||||
getMailboxByAccountIdAndType(accountId, Mailbox.TYPE_DRAFTS);
|
||||
if (mailbox == null) return null;
|
||||
final Message msg;
|
||||
Message msg = null;
|
||||
if (extras.containsKey(BaseColumns._ID)) {
|
||||
final long messageId = extras.getLong(BaseColumns._ID);
|
||||
msg = Message.restoreMessageWithId(getContext(), messageId);
|
||||
} else {
|
||||
}
|
||||
if (msg == null) {
|
||||
msg = new Message();
|
||||
}
|
||||
return uiSaveMessage(msg, mailbox, extras);
|
||||
|
Loading…
Reference in New Issue
Block a user