PaesslerAG/gval

Panic when provided using struct object with null pointer field

abdularis opened this issue · 2 comments

Error:
panic: reflect: call of reflect.Value.Interface on zero Value [recovered] panic: reflect: call of reflect.Value.Interface on zero Value

after quick reading, I think it has something to do with the usage of reflection, it does not check whether its valid reflect Value or not

Hi,

thanks for the finding and solution.

the example in your pull request contains a typed nil value. This breaks the current check.

Typed nil can also occur for slices and maps.

Fixed it together with the same issue in the ? operator.

#60