Prevent crash

pull/194/head
M66B 4 years ago
parent 26f726e04f
commit 5d5ae3a1da

@ -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

Loading…
Cancel
Save