From ff95789d2d86ed269ccf1ddc072fdc25be4da2de Mon Sep 17 00:00:00 2001
From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54>
Date: Wed, 27 Jun 2012 20:23:22 +0000
Subject: [PATCH] Fixed levelup screen

git-svn-id: http://svn.net-core.org/repos/t-engine4@5306 51575b47-30f0-44d4-a5cc-537603b46e54
---
 game/modules/tome/dialogs/elements/TalentTrees.lua | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/game/modules/tome/dialogs/elements/TalentTrees.lua b/game/modules/tome/dialogs/elements/TalentTrees.lua
index a828850926..6cf364d1e6 100644
--- a/game/modules/tome/dialogs/elements/TalentTrees.lua
+++ b/game/modules/tome/dialogs/elements/TalentTrees.lua
@@ -186,14 +186,14 @@ function _M:generate()
 		if not done then game.tooltip_x = nil self.last_mz = nil end
 	end)
 	self.key:addBinds{
-		ACCEPT = function() self:onUse(self.last_mz.item, true) end,
+		ACCEPT = function() if self.last_mz then self:onUse(self.last_mz.item, true) end end,
 		MOVE_UP = function() self:moveSel(-1, 0) end,
 		MOVE_DOWN = function() self:moveSel(1, 0) end,
 		MOVE_LEFT = function() self:moveSel(0, -1) end,
 		MOVE_RIGHT = function() self:moveSel(0, 1) end,
 	}
 	self.key:addCommands{
-		[{"_RETURN","ctrl"}] = function() self:onUse(self.last_mz.item, false) end,
+		[{"_RETURN","ctrl"}] = function() if self.last_mz then self:onUse(self.last_mz.item, false) end end,
 		[{"_UP","ctrl"}] = function() self.key:triggerVirtual("MOVE_UP") end,
 		[{"_DOWN","ctrl"}] = function() self.key:triggerVirtual("MOVE_DOWN") end,
 		[{"_LEFT","ctrl"}] = function() self.key:triggerVirtual("MOVE_LEFT") end,
-- 
GitLab