diff --git a/Modules/Tooltip/Tooltip.lua b/Modules/Tooltip/Tooltip.lua index 7cc5d50c..685dd0d4 100644 --- a/Modules/Tooltip/Tooltip.lua +++ b/Modules/Tooltip/Tooltip.lua @@ -800,19 +800,22 @@ function TT:Initialize() TT:SecureHook(SocialToastFrame, "SetPoint", "RepositionSocialToast") elseif SocialToastAnchorFrame then hooksecurefunc(SocialToastAnchorFrame, "ShowToast", function(self) - if self.toastFrames then - for _, toastFrame in ipairs(self.toastFrames) do - if not toastFrame.isSkinned then - toastFrame:SetTemplate("Transparent") - S:HandleIcon(toastFrame.Icon) - toastFrame.backdrop:SetFrameLevel(toastFrame:GetFrameLevel() + 2) - toastFrame.Icon:SetParent(toastFrame.backdrop) - S:HandleCloseButton(toastFrame.CloseButton) - - toastFrame.isSkinned = true + if type(self) == "table" then + if self.activeToasts and type(self.activeToasts) == "table" then + for key, toastFrame in pairs(self.activeToasts) do + if type(toastFrame) == "table" then + if not toastFrame.isSkinned then + toastFrame:SetTemplate("Transparent") + S:HandleIcon(toastFrame.Icon) + toastFrame.backdrop:SetFrameLevel(toastFrame:GetFrameLevel() + 2) + toastFrame.Icon:SetParent(toastFrame.backdrop) + S:HandleCloseButton(toastFrame.CloseButton) + + toastFrame.isSkinned = true + end + toastFrame.Icon:SetTexCoord(unpack(E.TexCoords)) + end end - - toastFrame.Icon:SetTexCoord(unpack(E.TexCoords)) end end end)