aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Core/API/Controllers/OptionsController.cs
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2025-09-06 18:57:30 -0500
committerJP Dillingham <jp@dillingham.me>2025-09-06 18:57:30 -0500
commit18aa0569569984547162d4fb466d3f6328127c74 (patch)
tree9120b2a4e3ff0d1bc8932df923a653f20cd789af /src/slskd/Core/API/Controllers/OptionsController.cs
parent8c24a8230fafe3eefee1302b0407f9c30085ea6d (diff)
downloadslskd-18aa0569569984547162d4fb466d3f6328127c74.tar.gz
fix bug causing an error to appear while editing a commented-out config
Diffstat (limited to 'src/slskd/Core/API/Controllers/OptionsController.cs')
-rw-r--r--src/slskd/Core/API/Controllers/OptionsController.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/slskd/Core/API/Controllers/OptionsController.cs b/src/slskd/Core/API/Controllers/OptionsController.cs
index e39c5fe1..25e9095a 100644
--- a/src/slskd/Core/API/Controllers/OptionsController.cs
+++ b/src/slskd/Core/API/Controllers/OptionsController.cs
@@ -190,6 +190,11 @@ namespace slskd.Core.API
{
var options = yaml.FromYaml<Options>();
+ if (options is null)
+ {
+ return true;
+ }
+
if (!options.TryValidate(out var result))
{
error = result.GetResultView();