Quantcast

Guard against nil ending times for auras when computing DoT ticks.

Johnny C. Lam [03-12-13 - 04:46]
Guard against nil ending times for auras when computing DoT ticks.

git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@752 d5049fe3-3747-40f7-a4b5-f36d6801af5f
Filename
OvaleCondition.lua
diff --git a/OvaleCondition.lua b/OvaleCondition.lua
index f202d80..9934006 100644
--- a/OvaleCondition.lua
+++ b/OvaleCondition.lua
@@ -1958,7 +1958,7 @@ end
 OvaleCondition.conditions.nexttick = function(condition)
 	local start, ending, _, spellHasteMultiplier = GetTargetAura(condition, getTarget(condition.target))
 	local tickLength = OvaleData:GetTickLength(condition[1], spellHasteMultiplier)
-	if tickLength then
+	if ending and tickLength then
 		while ending - tickLength > OvaleState.currentTime do
 			ending = ending - tickLength
 		end
@@ -2531,7 +2531,7 @@ end
 OvaleCondition.conditions.ticksremain = function(condition)
 	local start, ending, _, spellHasteMultiplier = GetTargetAura(condition, getTarget(condition.target))
 	local tickLength = OvaleData:GetTickLength(condition[1], spellHasteMultiplier)
-	if tickLength then
+	if ending and tickLength then
 		return 0, nil, 1, ending, -1/tickLength
 	end
 	return nil