From bea3879d6f5862886948b9045b6c6111b41f8480 Mon Sep 17 00:00:00 2001 From: Taylor Gerring Date: Wed, 1 Apr 2015 15:45:56 +0200 Subject: If nil, type doesn't matter --- rpc/messages.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'rpc') 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 -- cgit v1.2.3