mirror of
https://github.com/bitwarden/android.git
synced 2024-12-26 02:48:29 +03:00
fix for crash on startup when policies are non-existent (#1579)
This commit is contained in:
parent
62a8d1c017
commit
a0bb16c35f
1 changed files with 4 additions and 0 deletions
|
@ -201,6 +201,10 @@ namespace Bit.Core.Services
|
||||||
public async Task<bool> PolicyAppliesToUser(PolicyType policyType, Func<Policy, bool> policyFilter)
|
public async Task<bool> PolicyAppliesToUser(PolicyType policyType, Func<Policy, bool> policyFilter)
|
||||||
{
|
{
|
||||||
var policies = await GetAll(policyType);
|
var policies = await GetAll(policyType);
|
||||||
|
if (policies == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
var organizations = await _userService.GetAllOrganizationAsync();
|
var organizations = await _userService.GetAllOrganizationAsync();
|
||||||
|
|
||||||
IEnumerable<Policy> filteredPolicies;
|
IEnumerable<Policy> filteredPolicies;
|
||||||
|
|
Loading…
Reference in a new issue