Browse Source

Merge branch 'master' into dev

badlogic 9 years ago
parent
commit
f5aba88921
1 changed files with 3 additions and 1 deletions
  1. 3 1
      spine-lua/Skeleton.lua

+ 3 - 1
spine-lua/Skeleton.lua

@@ -40,6 +40,8 @@ local Color = require "spine-lua.Color"
 local setmetatable = setmetatable
 local ipairs = ipairs
 local table_insert = table.insert
+local math_min = math.min
+local math_max = math.max
 
 local Skeleton = {}
 Skeleton.__index = Skeleton
@@ -481,7 +483,7 @@ function Skeleton:getBounds(offset, size)
 			for i, slot in ipairs(drawOrder) do
 				local vertices = nil
 				local attachment = slot.attachment
-				if attachment.type == AttachmentType.region or attachment.type == AttachmentType.mesh then
+				if attachment and (attachment.type == AttachmentType.region or attachment.type == AttachmentType.mesh) then
 					vertices = attachment:updateWorldVertices(slot, false);
 				end
 				if vertices then