libs: add sanity checks to nameplate object order

This commit is contained in:
shagu
2021-08-27 12:07:19 +02:00
parent 3244a29659
commit 38d34152ed
+3 -1
View File
@@ -36,7 +36,9 @@ ShaguTweaks.libnameplate:SetScript("OnUpdate", function()
if IsNamePlate(plate) and not registry[plate] then
plate.healthbar = plate:GetChildren()
for i, object in pairs({plate:GetRegions()}) do
plate[NAMEPLATE_OBJECTORDER[i]] = object
if plate and NAMEPLATE_OBJECTORDER[i] then
plate[NAMEPLATE_OBJECTORDER[i]] = object
end
end
-- run OnInit functions