From d641b7a63e2b2dab56c7da3bb3b6e6bcd3daefd4 Mon Sep 17 00:00:00 2001 From: Ruben Pollan Date: Thu, 8 Oct 2020 17:25:54 +0200 Subject: [bug] don't crash on quit if no autostart --- pkg/backend/api.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3