From eb51d63656ce05cd647c26230fb01c9c214bd663 Mon Sep 17 00:00:00 2001 From: shagu Date: Thu, 10 Jan 2019 13:26:36 +0100 Subject: [PATCH] loot: abort when dropdownFrame cannot be accessed fixes: attempt to index local 'dropdownFrame' (a nil value) --- modules/loot.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/loot.lua b/modules/loot.lua index 47170a63..d5c795a4 100644 --- a/modules/loot.lua +++ b/modules/loot.lua @@ -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