|
@@ -65,7 +65,7 @@ func (iter *Iterator) ReadVal(obj interface{}) {
|
|
|
decoder := iter.cfg.getDecoderFromCache(cacheKey)
|
|
decoder := iter.cfg.getDecoderFromCache(cacheKey)
|
|
|
if decoder == nil {
|
|
if decoder == nil {
|
|
|
typ := reflect2.TypeOf(obj)
|
|
typ := reflect2.TypeOf(obj)
|
|
|
- if typ.Kind() != reflect.Ptr {
|
|
|
|
|
|
|
+ if typ == nil || typ.Kind() != reflect.Ptr {
|
|
|
iter.ReportError("ReadVal", "can only unmarshal into pointer")
|
|
iter.ReportError("ReadVal", "can only unmarshal into pointer")
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|