Explorar o código

Fixed bounding boxes when slot has no attachment.

NathanSweet %!s(int64=12) %!d(string=hai) anos
pai
achega
52420e8a37
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      spine-lua/SkeletonBounds.lua

+ 1 - 1
spine-lua/SkeletonBounds.lua

@@ -74,7 +74,7 @@ function SkeletonBounds.new ()
 
 		for i,slot in ipairs(skeleton.slots) do
 			local boundingBox = slot.attachment
-			if boundingBox.type == AttachmentType.boundingbox then
+			if boundingBox and boundingBox.type == AttachmentType.boundingbox then
 				table.insert(boundingBoxes, boundingBox)
 
 				local polygon = {}