From afbcb212f61b895821ac265be269477f98c00ba7 Mon Sep 17 00:00:00 2001 From: Federico Maccaroni Date: Fri, 1 Dec 2023 12:30:27 -0300 Subject: [PATCH] [PM-4896] Fix null reference exception on the region when setting env urls (#2876) * PM-4896 Fix null reference exception on the region * PM-4896 Updated dotnet version to set up in build workflow * PM-4896 Add NET 3.1.x and NET 7.0.x to Android build * PM-4896 Reversed to NET 3.1.x Android build * PM-4896 Removed changes on build.yml for net version name --- src/Core/Services/EnvironmentService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Core/Services/EnvironmentService.cs b/src/Core/Services/EnvironmentService.cs index 98d53c46b..b6ed6c279 100644 --- a/src/Core/Services/EnvironmentService.cs +++ b/src/Core/Services/EnvironmentService.cs @@ -75,7 +75,7 @@ namespace Bit.Core.Services var urls = await _stateService.GetEnvironmentUrlsAsync(); urls ??= await _stateService.GetPreAuthEnvironmentUrlsAsync(); - if (urls == null || urls.IsEmpty) + if (urls == null || urls.IsEmpty || region is null) { await SetRegionAsync(Region.US); _conditionedAwaiterManager.SetAsCompleted(AwaiterPrecondition.EnvironmentUrlsInited);