diff options
| author | JP Dillingham <jp@dillingham.me> | 2026-02-15 10:44:33 -0600 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2026-02-15 10:44:33 -0600 |
| commit | e510c8a9bdd728a1c8c9429d6a88ac522a2d85b6 (patch) | |
| tree | c1b10f5bbdb6c433742d7b04c52381c18bf12323 | |
| parent | e3c5ecd5ff1ff3cb5f6a66ebb726e6d5058cd4cd (diff) | |
| download | slskd-e510c8a9bdd728a1c8c9429d6a88ac522a2d85b6.tar.gz | |
swap null with a default instance to prevent null refs
| -rw-r--r-- | src/slskd/Integrations/VPN/VPNService.cs | 3 |
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) |
