From 925bad7a64907cf221e3f9cd390c84edaa431a88 Mon Sep 17 00:00:00 2001 From: NathanSweet Date: Tue, 16 Apr 2013 16:43:04 +0200 Subject: [PATCH] Fixed cocos2d bounding box crash. --- spine-cocos2d-iphone/src/spine/spine-cocos2d-iphone.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spine-cocos2d-iphone/src/spine/spine-cocos2d-iphone.m b/spine-cocos2d-iphone/src/spine/spine-cocos2d-iphone.m index f2a7f459c..0e8dfe3ff 100644 --- a/spine-cocos2d-iphone/src/spine/spine-cocos2d-iphone.m +++ b/spine-cocos2d-iphone/src/spine/spine-cocos2d-iphone.m @@ -354,7 +354,7 @@ char* _Util_readFile (const char* path, int* length) { for (int i = 0; i < skeleton->slotCount; ++i) { Slot* slot = skeleton->slots[i]; Attachment* attachment = slot->attachment; - if (attachment->type != ATTACHMENT_REGION) continue; + if (attachment && attachment->type != ATTACHMENT_REGION) continue; Cocos2dRegionAttachment* regionAttachment = SUB_CAST(Cocos2dRegionAttachment, attachment); minX = fmin(minX, regionAttachment->quad.bl.vertices.x); minY = fmin(minY, regionAttachment->quad.bl.vertices.y);