Skip to content

Commit 726ed9d

Browse files
authored
fix issue 508 (json-iterator#512)
2 parents adf50c0 + 75ce7fa commit 726ed9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

reflect.go

Lines changed: 1 addition & 1 deletion
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)