[client:client] constructor: avoid nil *context.T
This commit is contained in:
parent
996955b820
commit
3d7a8ae034
|
@ -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 */
|
||||||
|
|
Loading…
Reference in New Issue