From e8d3dbf96ea302067ad49001e70877707837c572 Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 25 Mar 2020 08:19:29 +0100 Subject: [PATCH] Check outbox --- app/src/main/java/eu/faircode/email/FragmentCompose.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentCompose.java b/app/src/main/java/eu/faircode/email/FragmentCompose.java index fb74762e20..b100cacc2f 100644 --- a/app/src/main/java/eu/faircode/email/FragmentCompose.java +++ b/app/src/main/java/eu/faircode/email/FragmentCompose.java @@ -3904,9 +3904,13 @@ public class FragmentCompose extends FragmentBase { // Delete draft (cannot move to outbox) EntityOperation.queue(context, draft, EntityOperation.DELETE); + EntityFolder outbox = db.folder().getOutbox(); + if (outbox == null) + throw new IllegalArgumentException("Outbox missing"); + // Copy message to outbox draft.id = null; - draft.folder = db.folder().getOutbox().id; + draft.folder = outbox.id; draft.uid = null; draft.fts = false; draft.ui_hide = false;