Quantcast

- bug fix for HasShield

Sidoine De Wispelaere [02-03-09 - 21:01]
- bug fix for HasShield

git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@17 d5049fe3-3747-40f7-a4b5-f36d6801af5f
Filename
Condition.lua
Ovale.toc
diff --git a/Condition.lua b/Condition.lua
index 96e93e9..ef0da9e 100644
--- a/Condition.lua
+++ b/Condition.lua
@@ -140,6 +140,10 @@ Ovale.conditions=
 	end,
 	HasShield = function(condition)
 		local _,_,id = string.find(GetInventoryItemLink("player",GetInventorySlotInfo("SecondaryHandSlot")) or "","(item:%d+:%d+:%d+:%d+)")
+		if (not id) then
+			return nil
+		end
+
 		local _,_,_,_,_,_,_,_,itemLoc = GetItemInfo(id)
 		if (itemLoc=="INVTYPE_SHIELD") then
 			return 0
diff --git a/Ovale.toc b/Ovale.toc
index f33cc25..48614f5 100644
--- a/Ovale.toc
+++ b/Ovale.toc
@@ -3,7 +3,7 @@
 ## Notes: Show the icon of the next spell to cast
 ## Notes-frFR: Affiche l'icône du prochain sort à lancer
 ## Author: Sidoine
-## Version: 3.0.2
+## Version: 3.0.3
 ## OptionalDeps: Ace3
 ## SavedVariables: OvaleDB
 ## SavedVariablesPerCharacter: OvaleDBPC