From a4531a6185dab279d93ece7eee893281222c0612 Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 11 Jul 2020 13:05:39 +0200 Subject: [PATCH] Added fail-safe --- app/src/main/java/eu/faircode/email/FragmentCompose.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/FragmentCompose.java b/app/src/main/java/eu/faircode/email/FragmentCompose.java index 716b553408..bfcbb9a699 100644 --- a/app/src/main/java/eu/faircode/email/FragmentCompose.java +++ b/app/src/main/java/eu/faircode/email/FragmentCompose.java @@ -4135,6 +4135,11 @@ public class FragmentCompose extends FragmentBase { else b = HtmlHelper.sanitizeCompose(context, body, true); + if (draft.revision == null) { + draft.revision = 1; + draft.revisions = 1; + } + int revision = draft.revision; // Save for undo/redo if (dirty || TextUtils.isEmpty(body) ||