Browse Source

Don't mix from uninitialized slot vertices.

Related to 27bab7bb951650c50c98b3b9b7bcc1fcb90c1570.
NathanSweet 9 years ago
parent
commit
e114f04bba
1 changed files with 5 additions and 5 deletions
  1. 5 5
      spine-lua/Animation.lua

+ 5 - 5
spine-lua/Animation.lua

@@ -612,11 +612,11 @@ function Animation.FfdTimeline.new ()
 		local frameVertices = self.frameVertices
 		local vertexCount = #frameVertices[0]
 		local vertices = slot.attachmentVertices
-		if not vertices or #vertices < vertexCount then
-			vertices = {}
-			slot.attachmentVertices = vertices
-		end
-		if #vertices ~= vertexCount then
+		if not vertices or #vertices ~= vertexCount then
+			if #vertices < vertexCount then
+				vertices = {}
+				slot.attachmentVertices = vertices
+			end
 			alpha = 1 -- Don't mix from uninitialized slot vertices.
 		end
 		slot.attachmentVerticesCount = vertexCount