mirror of
https://github.com/bitwarden/mobile
synced 2025-12-13 06:43:17 +00:00
null check cipher service
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
using AuthenticationServices;
|
using AuthenticationServices;
|
||||||
using Bit.App.Resources;
|
using Bit.App.Resources;
|
||||||
using Bit.Core.Abstractions;
|
using Bit.Core.Abstractions;
|
||||||
using Bit.Core.Utilities;
|
using Bit.Core.Utilities;
|
||||||
@@ -191,8 +191,8 @@ namespace Bit.iOS.Autofill
|
|||||||
|
|
||||||
private async Task ProvideCredentialAsync()
|
private async Task ProvideCredentialAsync()
|
||||||
{
|
{
|
||||||
var cipherService = ServiceContainer.Resolve<ICipherService>("cipherService");
|
var cipherService = ServiceContainer.Resolve<ICipherService>("cipherService", true);
|
||||||
var cipher = await cipherService.GetAsync(_context.CredentialIdentity.RecordIdentifier);
|
var cipher = await cipherService?.GetAsync(_context.CredentialIdentity.RecordIdentifier);
|
||||||
if(cipher == null || cipher.Type != Bit.Core.Enums.CipherType.Login)
|
if(cipher == null || cipher.Type != Bit.Core.Enums.CipherType.Login)
|
||||||
{
|
{
|
||||||
var err = new NSError(new NSString("ASExtensionErrorDomain"),
|
var err = new NSError(new NSString("ASExtensionErrorDomain"),
|
||||||
@@ -283,4 +283,4 @@ namespace Bit.iOS.Autofill
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user