diff options
author | Ruben Pollan <meskio@sindominio.net> | 2020-10-08 17:25:54 +0200 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2020-10-08 17:32:56 +0200 |
commit | d641b7a63e2b2dab56c7da3bb3b6e6bcd3daefd4 (patch) | |
tree | f1bda1f75e79ab30c2395984803f7b8c92d16a02 | |
parent | 9980d38b1fbd72b6bfe2ab07fbdec6350c21e3ea (diff) |
[bug] don't crash on quit if no autostart
-rw-r--r-- | pkg/backend/api.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/backend/api.go b/pkg/backend/api.go index b78605e..1d44f8a 100644 --- a/pkg/backend/api.go +++ b/pkg/backend/api.go @@ -48,7 +48,9 @@ func SwitchOff() { } func Quit() { - ctx.autostart.Disable() + if ctx.autostart != nil { + ctx.autostart.Disable() + } if ctx.Status != off { go setStatus(stopping) ctx.cfg.SetUserStoppedVPN(false) |