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)
================================================

View File

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

View File

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