fix nil pointer

Signed-off-by: chengdehao <dehaocheng@yunify.com>
This commit is contained in:
chengdehao
2022-05-10 22:52:14 +08:00
parent 499e21193c
commit 75803113f6
2 changed files with 8 additions and 2 deletions

View File

@@ -24,7 +24,7 @@ func (s *Options) Validate() []error {
}
func (s *Options) ApplyTo(options *Options) {
if len(s.Kinds) > 0 {
if s != nil && len(s.Kinds) > 0 {
options.Kinds = s.Kinds
}
}