Skip to content

Commit 9c78157

Browse files
fix
1 parent 29fb331 commit 9c78157

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

bindform.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,12 @@ func bindAdditionalProperties(additionalProperties reflect.Value, parentStruct r
288288

289289
func marshalFormImpl(v reflect.Value, result url.Values, name string) {
290290
switch v.Kind() {
291-
case reflect.Interface, reflect.Ptr:
291+
case reflect.Ptr:
292+
if v.IsNil() {
293+
break
294+
}
295+
fallthrough
296+
case reflect.Interface:
292297
marshalFormImpl(v.Elem(), result, name)
293298
case reflect.Slice:
294299
for i := 0; i < v.Len(); i++ {

0 commit comments

Comments
 (0)