From a3fb83b1c28fb4a9aeb9d422f2d2881fb633ebf7 Mon Sep 17 00:00:00 2001 From: Christopher Rosell Date: Sun, 29 Jul 2012 23:13:03 +0200 Subject: [PATCH] Always check that there is a unit available in UnitPopup hook. --- modules/lookup.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lookup.lua b/modules/lookup.lua index e8e34a0..fad46af 100755 --- a/modules/lookup.lua +++ b/modules/lookup.lua @@ -57,6 +57,7 @@ end I hope this doesn't make things blow up, at least it doesn't block "Set Focus". --]] local function UnitPopup_ShowMenu_hook(dropdown, which, unit, name, userdata) + if not unit then return end if not (UnitIsWildBattlePet(unit) or UnitIsBattlePetCompanion(unit)) then return end if UIDROPDOWNMENU_MENU_LEVEL ~= 1 then return end @@ -97,7 +98,6 @@ function module:Enable() hooksecurefunc("UnitPopup_ShowMenu", UnitPopup_ShowMenu_hook) end - local function OnUpdate(self, e) self.elapsed = self.elapsed + e -- 1.7.9.5