From 5d5ae3a1dac7087752496763191fbd488f405374 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 5 Mar 2021 12:12:03 +0100 Subject: [PATCH] Prevent crash --- app/src/main/java/eu/faircode/email/FragmentAnswer.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentAnswer.java b/app/src/main/java/eu/faircode/email/FragmentAnswer.java index 477aa65b0d..249adbaff6 100644 --- a/app/src/main/java/eu/faircode/email/FragmentAnswer.java +++ b/app/src/main/java/eu/faircode/email/FragmentAnswer.java @@ -182,12 +182,17 @@ public class FragmentAnswer extends FragmentBase { @Override protected void onExecuted(Bundle args, EntityAnswer answer) { if (savedInstanceState == null) { - etName.setText(answer == null ? getArguments().getString("subject") : answer.name); + Bundle a = getArguments(); + if (a == null) + a = new Bundle(); + + etName.setText(answer == null ? a.getString("subject") : answer.name); etGroup.setText(answer == null ? null : answer.group); cbStandard.setChecked(answer == null ? false : answer.standard); cbFavorite.setChecked(answer == null ? false : answer.favorite); cbHide.setChecked(answer == null ? false : answer.hide); - String html = (answer == null ? getArguments().getString("html") : answer.text); + + String html = (answer == null ? a.getString("html") : answer.text); if (html == null) etText.setText(null); else