From e510c8a9bdd728a1c8c9429d6a88ac522a2d85b6 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sun, 15 Feb 2026 10:44:33 -0600 Subject: swap null with a default instance to prevent null refs --- src/slskd/Integrations/VPN/VPNService.cs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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) -- cgit v1.2.3