From ae48c8d9b51692408bea843e2217fa237c7ca804 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 6 Jul 2017 16:31:46 -0400 Subject: [PATCH] null ref fix --- src/Api/Controllers/TwoFactorController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Api/Controllers/TwoFactorController.cs b/src/Api/Controllers/TwoFactorController.cs index eee501b78..b32964846 100644 --- a/src/Api/Controllers/TwoFactorController.cs +++ b/src/Api/Controllers/TwoFactorController.cs @@ -41,7 +41,7 @@ namespace Bit.Api.Controllers throw new UnauthorizedAccessException(); } - var providers = user.GetTwoFactorProviders().Select(p => new TwoFactorProviderResponseModel(p.Key, p.Value)); + var providers = user.GetTwoFactorProviders()?.Select(p => new TwoFactorProviderResponseModel(p.Key, p.Value)); return new ListResponseModel(providers); }