1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-18 01:03:24 +00:00

null checks

This commit is contained in:
Kyle Spearrin
2018-10-06 17:28:40 -04:00
parent b7c6b65a3d
commit 525b5fa19a
4 changed files with 16 additions and 16 deletions

View File

@@ -26,21 +26,21 @@ namespace Bit.iOS.Core.Utilities
}
if (identities.Any())
{
await ASCredentialIdentityStore.SharedStore.ReplaceCredentialIdentitiesAsync(identities.ToArray());
await ASCredentialIdentityStore.SharedStore?.ReplaceCredentialIdentitiesAsync(identities.ToArray());
}
}
}
public static async Task<bool> IdentitiesCanIncremental()
{
var state = await ASCredentialIdentityStore.SharedStore.GetCredentialIdentityStoreStateAsync();
return state.Enabled && state.SupportsIncrementalUpdates;
var state = await ASCredentialIdentityStore.SharedStore?.GetCredentialIdentityStoreStateAsync();
return state != null && state.Enabled && state.SupportsIncrementalUpdates;
}
public static async Task<bool> AutofillEnabled()
{
var state = await ASCredentialIdentityStore.SharedStore.GetCredentialIdentityStoreStateAsync();
return state.Enabled;
var state = await ASCredentialIdentityStore.SharedStore?.GetCredentialIdentityStoreStateAsync();
return state != null && state.Enabled;
}
public static async Task<ASPasswordCredentialIdentity> GetCipherIdentityAsync(string cipherId, ICipherService cipherService)