Fixed the SetSkin(skin) method causing a stack overflow

This commit is contained in:
Kenny Shields 2012-05-28 14:37:30 -04:00
parent 9aa5b866af
commit fd2637e7d9
3 changed files with 12 additions and 7 deletions

View File

@ -1,3 +1,8 @@
================================================
Version 0.9.2.4 - Alpha (May 27 - 2012)
================================================
[FIXED] the SetSkin(skin) method causing a stack overflow
================================================ ================================================
Version 0.9.2.3 - Alpha (May 27 - 2012) Version 0.9.2.3 - Alpha (May 27 - 2012)
================================================ ================================================

View File

@ -9,7 +9,7 @@ loveframes = {}
-- library info -- library info
loveframes.info = {} loveframes.info = {}
loveframes.info.author = "Nikolai Resokav" loveframes.info.author = "Nikolai Resokav"
loveframes.info.version = "0.9.2.3" loveframes.info.version = "0.9.2.4"
loveframes.info.stage = "Alpha" loveframes.info.stage = "Alpha"
-- library configurations -- library configurations

View File

@ -835,19 +835,19 @@ end
--]]--------------------------------------------------------- --]]---------------------------------------------------------
function base:SetSkin(name) function base:SetSkin(name)
local pchildren = self.parent.children local children = self.children
local pinternals = self.parent.internals local internals = self.internals
self.skin = name self.skin = name
if pchildren then if children then
for k, v in ipairs(pchildren) do for k, v in ipairs(children) do
v:SetSkin(name) v:SetSkin(name)
end end
end end
if pinternals then if internals then
for k, v in ipairs(pinternals) do for k, v in ipairs(internals) do
v:SetSkin(name) v:SetSkin(name)
end end
end end