fix panic

This commit is contained in:
lwl0608 2024-03-25 11:25:37 +08:00
parent a934f070d7
commit 7bb527c1dc
1 changed files with 3 additions and 0 deletions

View File

@ -40,6 +40,9 @@ func (interceptor *CryptoTagInterceptor) Intercept(p any, tags ...string) (err e
//开始遍历标签
for interceptor.cryptoEleQueue.Len() != 0 {
cryptoElement, _ := interceptor.cryptoEleQueue.Remove(interceptor.cryptoEleQueue.Front()).(*CryptoElement)
if cryptoElement == nil {
continue
}
if cryptoElement.eleType == StructPtr { // *struct
if err = interceptor.parse(cryptoElement.eleValue.Interface(), tags...); err != nil {