add check for null preference

This commit is contained in:
Philipp Crocoll
2018-01-05 05:37:41 +01:00
parent 138ed85f93
commit 45fb856898

View File

@@ -466,6 +466,8 @@ namespace keepass2android
private void UpdateAutofillPref()
{
var autofillPref = FindPreference(GetString(Resource.String.AutoFill_prefs_key));
if (autofillPref == null)
return;
if ((Android.OS.Build.VERSION.SdkInt < Android.OS.BuildVersionCodes.O) ||
!((AutofillManager) Activity.GetSystemService(Java.Lang.Class.FromType(typeof(AutofillManager))))
.IsAutofillSupported)