[client:client] constructor: avoid nil *context.T

This commit is contained in:
xdrm-brackets 2018-04-22 21:15:19 +02:00
parent 996955b820
commit 3d7a8ae034
1 changed files with 1 additions and 0 deletions

View File

@ -34,6 +34,7 @@ func New(ctx *context.T, saveDir string) (*T, error) {
inst := new(T) inst := new(T)
/* (1) Store context */ /* (1) Store context */
if ctx == nil { return nil, errors.New("Context must not be nil"); }
inst.ctx = ctx inst.ctx = ctx
/* (2) Get file management for KEY */ /* (2) Get file management for KEY */