Fix nil struct

This commit is contained in:
Lunny Xiao 2021-06-29 11:24:50 +08:00
parent 1c5b27a85b
commit c9d3db98be
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
1 changed files with 3 additions and 0 deletions

View File

@ -88,6 +88,9 @@ func (statement *Statement) BuildUpdates(tableValue reflect.Value,
if err != nil {
return nil, nil, err
}
if fieldValuePtr == nil {
continue
}
fieldValue := *fieldValuePtr
fieldType := reflect.TypeOf(fieldValue.Interface())