[solar2d] Closes #1749, check if removeSelf is available on draw group

This commit is contained in:
badlogic 2021-06-10 13:44:23 +02:00
parent 20873f249f
commit f70363b1a6
2 changed files with 2 additions and 3 deletions

3
.gitignore vendored
View File

@ -108,8 +108,7 @@ spine-tk2d/*.sln
spine-tk2d/Assets/TK2DROOT*
spine-tk2d/Assets/-tk2d*
spine-corona/spine-lua/
!spine-corona/spine-lua/Place spine-lua here.txt
spine-solar2d/spine-lua/
spine-love/spine-lua/
spine-love/love/

View File

@ -133,7 +133,7 @@ function spine.Skeleton:updateWorldTransform()
if (self.vertexEffect) then self.vertexEffect:beginEffect(self) end
-- Remove old drawing group, we will start anew
if self.drawingGroup then self.drawingGroup:removeSelf() end
if self.drawingGroup and self.drawingGroup.removeSelf then self.drawingGroup:removeSelf() end
local drawingGroup = display.newGroup()
self.drawingGroup = drawingGroup
self.group:insert(drawingGroup)