We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6821bec commit 1779031Copy full SHA for 1779031
reflect.go
@@ -65,7 +65,7 @@ func (iter *Iterator) ReadVal(obj interface{}) {
65
decoder := iter.cfg.getDecoderFromCache(cacheKey)
66
if decoder == nil {
67
typ := reflect2.TypeOf(obj)
68
- if typ.Kind() != reflect.Ptr {
+ if typ == nil || typ.Kind() != reflect.Ptr {
69
iter.ReportError("ReadVal", "can only unmarshal into pointer")
70
return
71
}
0 commit comments