From 6e0e7867bd2876c0899ca236b25fcaa9f79d7cc3 Mon Sep 17 00:00:00 2001 From: Hendrik Leppkes Date: Sat, 23 Aug 2008 09:55:50 +0000 Subject: [PATCH] small fix for classes without stances --- buttonPrototypes/ActionButton.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buttonPrototypes/ActionButton.lua b/buttonPrototypes/ActionButton.lua index b949037..7354221 100644 --- a/buttonPrototypes/ActionButton.lua +++ b/buttonPrototypes/ActionButton.lua @@ -224,7 +224,7 @@ function Button:RefreshAllStateActions() end function Button:RefreshStateAction(state) - local state = tonumber(state or self:GetAttribute("state")) + local state = tonumber(state or self:GetAttribute("state") or 0) local action = self.stateactions[state] self:SetAttribute("type--" .. state, "action") self:SetAttribute("action--" .. state, action)