Quantcast

Protect against nil tables.

Johnny C. Lam [03-24-13 - 06:40]
Protect against nil tables.

git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@827 d5049fe3-3747-40f7-a4b5-f36d6801af5f
Filename
OvaleFrame.lua
diff --git a/OvaleFrame.lua b/OvaleFrame.lua
index 95bf3c5..27a5e3e 100644
--- a/OvaleFrame.lua
+++ b/OvaleFrame.lua
@@ -169,7 +169,12 @@ do

 		OvaleState:StartNewFrame()
 		for k,node in pairs(OvaleCompile.masterNodes) do
-			local target = node.params.target or "target"
+			local target
+			if node.params and node.params.target then
+				target = node.params.target
+			else
+				target = "target"
+			end
 			OvaleCondition.defaultTarget = target

 			if forceRefresh or Ovale.refreshNeeded[target] or Ovale.refreshNeeded["player"] or Ovale.refreshNeeded["pet"] then