From 5c5f9ef6863a1efd868db5b584ca3fcbdbaf0a2c Mon Sep 17 00:00:00 2001 From: "James D. Callahan III" Date: Fri, 9 Apr 2010 20:17:20 -0400 Subject: [PATCH] In Player:MarkExclusions(): Don't check the recipe's KNOWN state until it has been determined that recipe is not nil. Fixes ticket #987. --- Player.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Player.lua b/Player.lua index 6eeb0a8..84121de 100644 --- a/Player.lua +++ b/Player.lua @@ -76,10 +76,9 @@ function Player:MarkExclusions() for spell_id in pairs(exclusion_list) do local recipe = recipe_list[spell_id] - local is_known = recipe:HasState("KNOWN") if recipe then - if is_known and recipe.profession == profession then + if recipe:HasState("KNOWN") and recipe.profession == profession then known_count = known_count + 1 elseif recipe_profession == profession then unknown_count = unknown_count + 1 -- 1.7.9.5