aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rpc/messages.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/rpc/messages.go b/rpc/messages.go
index 3c011cd93..549268cce 100644
--- a/rpc/messages.go
+++ b/rpc/messages.go
@@ -45,6 +45,9 @@ func (d *hexdata) UnmarshalJSON(b []byte) (err error) {
func newHexData(input interface{}) *hexdata {
d := new(hexdata)
+ if input == nil {
+ d.data = nil
+ }
switch input := input.(type) {
case []byte:
d.data = input