loot: abort when dropdownFrame cannot be accessed

fixes: attempt to index local 'dropdownFrame' (a nil value)
This commit is contained in:
shagu
2019-01-10 13:26:36 +01:00
parent 2c273f5786
commit eb51d63656
+2 -1
View File
@@ -51,7 +51,7 @@ pfUI:RegisterModule("loot", function ()
end
k = k<15 and k+1 or 1
end
end
end
end
pfUI.loot:RegisterEvent("CHAT_MSG_SYSTEM")
pfUI.loot.randomRolling = true
@@ -389,6 +389,7 @@ pfUI:RegisterModule("loot", function ()
pfUI.loot:AddMasterLootMenus()
hooksecurefunc("UnitPopup_OnClick",function()
local dropdownFrame = getglobal(UIDROPDOWNMENU_INIT_MENU)
if not dropdownFrame then return end
local button = this.value
local unit = dropdownFrame.unit
local name = dropdownFrame.name