summaryrefslogtreecommitdiff
path: root/pkg/backend/api.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/backend/api.go')
-rw-r--r--pkg/backend/api.go4
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)