diff --git a/modules/hero/configure_comp.go b/modules/hero/configure_comp.go index d3047e27a..fde75cc99 100644 --- a/modules/hero/configure_comp.go +++ b/modules/hero/configure_comp.go @@ -449,7 +449,9 @@ func (this *configureComp) GetHeroMaxLv(star int32) int32 { if v, err := this.GetConfigure(hero_stargrow); err == nil { if configure, ok := v.(*cfg.GameHeroStargrow); ok { - return configure.Get(star).Maxlevel + if configure.Get(star) != nil { + return configure.Get(star).Maxlevel + } } } this.module.Errorf(" GetHeroMaxLv err : star:%d", star)