diff options
Diffstat (limited to 'pkg/backend/api.go')
-rw-r--r-- | pkg/backend/api.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/pkg/backend/api.go b/pkg/backend/api.go index 99e156f..ff8c1bb 100644 --- a/pkg/backend/api.go +++ b/pkg/backend/api.go @@ -4,7 +4,6 @@ package backend import ( "C" - "fmt" "log" "strconv" "unsafe" @@ -31,7 +30,9 @@ func Quit() { } else { ctx.cfg.SetUserStoppedVPN(true) } - ctx.bm.Close() + if ctx.bm != nil { + ctx.bm.Close() + } } func DonateAccepted() { @@ -55,7 +56,9 @@ func InitializeBitmaskContext(opts *InitOpts) { initOnce.Do(func() { initializeContext(opts) }) runDonationReminder() - go ctx.updateStatus() + if ctx.bm != nil { + go ctx.updateStatus() + } } func RefreshContext() *C.char { |