mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-25 06:42:16 +00:00
fix invalid memory address or nil pointer dereference
This commit is contained in:
parent
60a1f49a5c
commit
6c1572c9b8
@ -146,9 +146,8 @@ func unmarshalResponseBytes(responseBytes []byte, result interface{}) (interface
|
||||
if err != nil {
|
||||
return nil, errors.Errorf("Error unmarshalling rpc response: %v", err)
|
||||
}
|
||||
errorStr := response.Error.Message
|
||||
if errorStr != "" {
|
||||
return nil, errors.Errorf("Response error: %v", errorStr)
|
||||
if response.Error != nil && response.Error.Message != "" {
|
||||
return nil, errors.Errorf("Response error: %v", response.Error.Message)
|
||||
}
|
||||
// unmarshal the RawMessage into the result
|
||||
err = json.Unmarshal(*response.Result, result)
|
||||
|
Loading…
x
Reference in New Issue
Block a user