From 5e63ad58b8de3528bd93f63132202b6e32195341 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 15 Aug 2017 14:48:56 -0400 Subject: [PATCH] fix null ref --- .../Implementations/BaseRelayPushNotificationService.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Core/Services/Implementations/BaseRelayPushNotificationService.cs b/src/Core/Services/Implementations/BaseRelayPushNotificationService.cs index 16c023b42b..0be19c33de 100644 --- a/src/Core/Services/Implementations/BaseRelayPushNotificationService.cs +++ b/src/Core/Services/Implementations/BaseRelayPushNotificationService.cs @@ -79,7 +79,12 @@ namespace Bit.Core.Services _logger.LogError(12339, e, "Unable to auth for push."); } - if(response == null || !response.IsSuccessStatusCode) + if(response == null) + { + return false; + } + + if(!response.IsSuccessStatusCode) { if(response.StatusCode == HttpStatusCode.BadRequest) {