diff --git a/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua b/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua index 35995ff2e4..7265307c92 100644 --- a/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua @@ -268,7 +268,7 @@ function this.GetAllHeroDataMsinusUpWar(_sortTypeId,type) --0全部 1-6属性 7 local isFormations = {} for n, w in pairs(FormationManager.formationList) do for m = 1, #w.teamHeroInfos do - if v.dynamicId == w.teamHeroInfos[m].heroId then + if w.teamHeroInfos[m] and v.dynamicId == w.teamHeroInfos[m].heroId then --队伍名称 队伍id local isFormationStr = "" local curFormationId = 0