Skip to content

Commit 1779031

Browse files
committed
fix issue 508
1 parent 6821bec commit 1779031

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

reflect.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func (iter *Iterator) ReadVal(obj interface{}) {
6565
decoder := iter.cfg.getDecoderFromCache(cacheKey)
6666
if decoder == nil {
6767
typ := reflect2.TypeOf(obj)
68-
if typ.Kind() != reflect.Ptr {
68+
if typ == nil || typ.Kind() != reflect.Ptr {
6969
iter.ReportError("ReadVal", "can only unmarshal into pointer")
7070
return
7171
}

0 commit comments

Comments
 (0)