From a3e10d3ca83c78f19d342a76caebefa924b8d705 Mon Sep 17 00:00:00 2001 From: Matthew Wong Date: Thu, 31 Dec 2015 07:20:48 -0500 Subject: Fix 'Delete' nullpointerexception and revert to working URL-getting --- app/src/main/java/com/zeapo/pwdstore/autofill/AutofillFragment.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/src/main/java/com/zeapo/pwdstore/autofill/AutofillFragment.java') diff --git a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillFragment.java b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillFragment.java index 1ebf4828..474c3e35 100644 --- a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillFragment.java +++ b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillFragment.java @@ -137,7 +137,8 @@ public class AutofillFragment extends DialogFragment { builder.setNeutralButton(R.string.autofill_apps_delete, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { - if (packageName != null && !packageName.equals("")) { + if (((AutofillPreferenceActivity) getActivity()).recyclerAdapter != null + && packageName != null && !packageName.equals("")) { editor.remove(packageName); ((AutofillPreferenceActivity) getActivity()).recyclerAdapter.removeWebsite(packageName); editor.apply(); -- cgit v1.2.3