From 3d7a8ae03434c7541f5575a42321d97416ae7225 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Sun, 22 Apr 2018 21:15:19 +0200 Subject: [PATCH] [client:client] constructor: avoid nil *context.T --- src/git.xdrm.io/schastsp/client/client.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/git.xdrm.io/schastsp/client/client.go b/src/git.xdrm.io/schastsp/client/client.go index c83119c..ec0a673 100644 --- a/src/git.xdrm.io/schastsp/client/client.go +++ b/src/git.xdrm.io/schastsp/client/client.go @@ -34,6 +34,7 @@ func New(ctx *context.T, saveDir string) (*T, error) { inst := new(T) /* (1) Store context */ + if ctx == nil { return nil, errors.New("Context must not be nil"); } inst.ctx = ctx /* (2) Get file management for KEY */