fixes from rebase

This commit is contained in:
Ethan Buchman
2017-05-04 23:03:42 -04:00
parent 46151720f8
commit 75989342b0
3 changed files with 5 additions and 10 deletions

View File

@ -145,7 +145,7 @@ func mapParamsToArgs(rpcFunc *RPCFunc, params map[string]*json.RawMessage, argsO
for i, argName := range rpcFunc.argNames {
argType := rpcFunc.args[i+argsOffset]
if p, ok := params[argName]; ok && len(*p) > 0 {
if p, ok := params[argName]; ok && p != nil && len(*p) > 0 {
val := reflect.New(argType)
err := json.Unmarshal(*p, val.Interface())
if err != nil {