Skip to content

Commit

Permalink
Check isnil
Browse files Browse the repository at this point in the history
  • Loading branch information
eatonphil committed May 13, 2022
1 parent 6a89301 commit 12637a6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion callback.go
Expand Up @@ -354,7 +354,12 @@ func callbackRetNil(ctx *C.sqlite3_context, v reflect.Value) error {
}

func callbackRetGeneric(ctx *C.sqlite3_context, v reflect.Value) error {
cb, err := callbackRet(v.Elem().Type())
if v.IsNil() {
C.sqlite3_result_null(ctx)
return nil
}

cb, err := callbackRet(v.Elem().Type())
if err != nil {
return err
}
Expand Down

0 comments on commit 12637a6

Please sign in to comment.