diff --git a/twidere/src/main/java/org/mariotaku/twidere/fragment/HostMappingsListFragment.java b/twidere/src/main/java/org/mariotaku/twidere/fragment/HostMappingsListFragment.java index c0e81cd52..734ae1d18 100644 --- a/twidere/src/main/java/org/mariotaku/twidere/fragment/HostMappingsListFragment.java +++ b/twidere/src/main/java/org/mariotaku/twidere/fragment/HostMappingsListFragment.java @@ -238,11 +238,13 @@ public class HostMappingsListFragment extends BaseListFragment implements MultiC mEditAddress.addTextChangedListener(this); mCheckExclude.setOnCheckedChangeListener(this); final Bundle args = getArguments(); - mEditHost.setEnabled(!args.getBoolean(EXTRA_EDIT_MODE, false)); - if (savedInstanceState == null) { - mEditHost.setText(args.getCharSequence(EXTRA_HOST)); - mEditAddress.setText(args.getCharSequence(EXTRA_ADDRESS)); - mCheckExclude.setChecked(args.getBoolean(EXTRA_EXCLUDED)); + if (args != null) { + mEditHost.setEnabled(!args.getBoolean(EXTRA_EDIT_MODE, false)); + if (savedInstanceState == null) { + mEditHost.setText(args.getCharSequence(EXTRA_HOST)); + mEditAddress.setText(args.getCharSequence(EXTRA_ADDRESS)); + mCheckExclude.setChecked(args.getBoolean(EXTRA_EXCLUDED)); + } } builder.setTitle(R.string.add_host_mapping); builder.setPositiveButton(android.R.string.ok, this);