diff ui/JewelPanel.lua @ 28:4317e56e0a91

Fixed some crash issues with items and gems
author Adam tegen <adam.tegen@gmail.com>
date Fri, 17 Oct 2014 00:08:54 -0500
parents e77e01abce98
children
line wrap: on
line diff
--- a/ui/JewelPanel.lua	Wed Oct 15 19:08:21 2014 -0500
+++ b/ui/JewelPanel.lua	Fri Oct 17 00:08:54 2014 -0500
@@ -114,7 +114,7 @@
 		--if i <= #optimizedGems or currentGemLink then
 		if i <= #optimizedGems or currentGemLink then
 			local optimizedGemId = 0
-			if optimizedGems[i] > 0 then
+			if optimizedGems[i] and optimizedGems[i] > 0 then
 				optimizedGemId = AskMrRobot.ExtraGemData[optimizedGems[i]].id
 			end
 			--local currentGemId = AskMrRobot.ExtraGemData[showGems[i]].id
@@ -141,7 +141,7 @@
 
 			--if showGems[i] and optimizedGems[i] and optimizedGems[i].color then
 			--if test and optimizedGems[i] and optimizedGems[i].color then
-			if mismatched and optimizedGems[i] > 0 then
+			if mismatched and optimizedGems[i] and optimizedGems[i] > 0 then
 				gemCount = gemCount + 1
 				-- set the optimized gem text
 				text:SetTextColor(1,1,1)