mirror of
https://github.com/bitwarden/android.git
synced 2025-01-11 18:57:39 +03:00
null checks
This commit is contained in:
parent
028ebff102
commit
0b56dd2795
1 changed files with 5 additions and 1 deletions
|
@ -429,6 +429,10 @@ namespace Bit.Droid.Services
|
|||
public void Autofill(CipherView cipher)
|
||||
{
|
||||
var activity = (MainActivity)CrossCurrentActivity.Current.Activity;
|
||||
if(activity == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if(activity.Intent.GetBooleanExtra("autofillFramework", false))
|
||||
{
|
||||
if(cipher == null)
|
||||
|
@ -447,7 +451,7 @@ namespace Bit.Droid.Services
|
|||
}
|
||||
var parser = new Parser(structure, activity.ApplicationContext);
|
||||
parser.Parse();
|
||||
if(!parser.FieldCollection.Fields.Any() || string.IsNullOrWhiteSpace(parser.Uri))
|
||||
if((!parser.FieldCollection?.Fields?.Any() ?? true) || string.IsNullOrWhiteSpace(parser.Uri))
|
||||
{
|
||||
activity.SetResult(Result.Canceled);
|
||||
activity.Finish();
|
||||
|
|
Loading…
Reference in a new issue