fix nil struct
This commit is contained in:
parent
64af3fef00
commit
1c5b27a85b
|
@ -86,7 +86,7 @@ func (col *Column) ValueOfV(dataStruct *reflect.Value) (*reflect.Value, error) {
|
||||||
for _, i := range col.FieldIndex {
|
for _, i := range col.FieldIndex {
|
||||||
if v.Kind() == reflect.Ptr {
|
if v.Kind() == reflect.Ptr {
|
||||||
if v.IsNil() {
|
if v.IsNil() {
|
||||||
return nil, nil
|
v.Set(reflect.New(v.Type().Elem()))
|
||||||
}
|
}
|
||||||
v = v.Elem()
|
v = v.Elem()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue