From 25f78a6378b4793a1f840ea6454858330e53915e Mon Sep 17 00:00:00 2001 From: shagu Date: Thu, 18 Jul 2019 20:39:22 +0200 Subject: [PATCH] unitframes: break on non-initialized buttons --- api/unitframes.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/unitframes.lua b/api/unitframes.lua index 4aea812a..0ba82151 100644 --- a/api/unitframes.lua +++ b/api/unitframes.lua @@ -1182,6 +1182,8 @@ function pfUI.uf:RefreshUnit(unit, component) -- Buffs if unit.buffs and ( component == "all" or component == "aura" ) then for i=1, unit.config.bufflimit do + if not unit.buffs[i] then break end + local texture, stacks if unit.label == "player" then stacks = GetPlayerBuffApplications(GetPlayerBuff(PLAYER_BUFF_START_ID+i,"HELPFUL")) @@ -1212,6 +1214,8 @@ function pfUI.uf:RefreshUnit(unit, component) -- Debuffs if unit.debuffs and ( component == "all" or component == "aura" ) then for i=1, unit.config.debufflimit do + if not unit.debuffs[i] then break end + local perrow = unit.config.debuffperrow local bperrow = unit.config.buffperrow