From 02cf5e99e508d924890d35063c610c62eeeab542 Mon Sep 17 00:00:00 2001 From: Marcel Baumgartner Date: Sun, 21 May 2023 23:07:33 +0200 Subject: [PATCH] Added edge case check for oauth2 service --- Moonlight/App/Services/OAuth2Service.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Moonlight/App/Services/OAuth2Service.cs b/Moonlight/App/Services/OAuth2Service.cs index 0dcc309d..c96bd497 100644 --- a/Moonlight/App/Services/OAuth2Service.cs +++ b/Moonlight/App/Services/OAuth2Service.cs @@ -26,7 +26,9 @@ public class OAuth2Service var config = ConfigService.GetSection("Moonlight").GetSection("OAuth2"); - Configs = config.GetSection("Providers").Get(); + Configs = config.GetSection("Providers").Get() + ?? Array.Empty(); + OverrideUrl = config.GetValue("OverrideUrl"); EnableOverrideUrl = config.GetValue("EnableOverrideUrl"); AppUrl = configService.GetSection("Moonlight").GetValue("AppUrl");