From 5ab676b54c0452431bf42f114bca371dc5537052 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 11 Mar 2022 08:13:52 +0100 Subject: [PATCH] Prevent crash --- app/src/main/java/eu/faircode/email/FragmentCompose.java | 2 +- 1 file changed, 1 insertion(+), 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 e0b631a585..2dbb0cbd5e 100644 --- a/app/src/main/java/eu/faircode/email/FragmentCompose.java +++ b/app/src/main/java/eu/faircode/email/FragmentCompose.java @@ -1346,7 +1346,7 @@ public class FragmentCompose extends FragmentBase { outState.putParcelable("fair:pickUri", pickUri); // Focus was lost at this point - outState.putInt("fair:selection", etBody.getSelectionStart()); + outState.putInt("fair:selection", etBody == null ? 0 : etBody.getSelectionStart()); super.onSaveInstanceState(outState); }