aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2026-02-15 10:44:33 -0600
committerJP Dillingham <jp@dillingham.me>2026-02-15 10:44:33 -0600
commite510c8a9bdd728a1c8c9429d6a88ac522a2d85b6 (patch)
treec1b10f5bbdb6c433742d7b04c52381c18bf12323 /src
parente3c5ecd5ff1ff3cb5f6a66ebb726e6d5058cd4cd (diff)
downloadslskd-e510c8a9bdd728a1c8c9429d6a88ac522a2d85b6.tar.gz
swap null with a default instance to prevent null refs
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Integrations/VPN/VPNService.cs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/slskd/Integrations/VPN/VPNService.cs b/src/slskd/Integrations/VPN/VPNService.cs
index 1f59db99..db09c041 100644
--- a/src/slskd/Integrations/VPN/VPNService.cs
+++ b/src/slskd/Integrations/VPN/VPNService.cs
@@ -213,6 +213,9 @@ public class VPNService : IDisposable
}
}
+ // if the VPN client returned null, swap it for a default instance to prevent null refs
+ status ??= new VPNStatus();
+
if (!IsReady && isReadyNow)
{
if (options.PortForwarding)