Fix scan nil primitive type slice
This commit is contained in:
parent
b31464e491
commit
fee77b695a
2 changed files with 12 additions and 8 deletions
|
|
@ -214,9 +214,9 @@ func mapRowToBaseTypeSlice(scanContext *scanContext, slicePtrValue reflect.Value
|
|||
}
|
||||
rowElemPtr := scanContext.rowElemValuePtr(index)
|
||||
|
||||
if !rowElemPtr.IsNil() {
|
||||
if rowElemPtr != nil && !rowElemPtr.IsNil() {
|
||||
updated = true
|
||||
err = appendElemToSlice(slicePtrValue, rowElemPtr)
|
||||
err = appendElemToSlice(slicePtrValue, *rowElemPtr)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue