Quantcast

Fixed tooltip bug with bad type lookup for disabled plugins

PProvost-35627 [04-04-09 - 16:45]
Fixed tooltip bug with bad type lookup for disabled plugins
Filename
NinjaPanel.lua
diff --git a/NinjaPanel.lua b/NinjaPanel.lua
index a1f5772..c43e9b4 100644
--- a/NinjaPanel.lua
+++ b/NinjaPanel.lua
@@ -692,7 +692,7 @@ frame:SetScript("OnShow", function(frame)
 	local EDGEGAP, ROWHEIGHT, ROWGAP, GAP = 16, 20, 2, 4

 	local function OnEnter(self)
-		local type = NinjaPanel.plugins[self.name].object.type or "Unknown"
+		local type = (NinjaPanel.plugins[self.name] and NinjaPanel.plugins[self.name].object.type) or "Unknown"
 		GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT")
 		GameTooltip:AddLine(self.name, nil, nil, nil, true)
 		GameTooltip:AddLine(type, 1, 1, 1, true)