Quantcast

Fixed a nil error when an item has no text

Kevin Lyles [04-07-12 - 17:52]
Fixed a nil error when an item has no text
Filename
WeightsWatcher.lua
diff --git a/WeightsWatcher.lua b/WeightsWatcher.lua
index 5050e36..ab8eef9 100644
--- a/WeightsWatcher.lua
+++ b/WeightsWatcher.lua
@@ -1472,6 +1472,10 @@ function WeightsWatcher.getItemStats(link)
 	WeightsWatcherHiddenTooltip:ClearLines()
 	WeightsWatcherHiddenTooltip:SetHyperlink(link)

+	if WeightsWatcherHiddenTooltip:NumLines() < 1 then
+		return {}
+	end
+
 	-- Skip item name and "currently equipped"
 	if WeightsWatcherHiddenTooltipTextLeft1:GetText() == CURRENTLY_EQUIPPED then
 		start = 3