Merge branch 'master' into dev

This commit is contained in:
badlogic 2016-10-20 14:40:02 +02:00
commit f5aba88921

View File

@ -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