From 6e09fb8512b74ca66d4ff323649fee110703d138 Mon Sep 17 00:00:00 2001 From: badlogic Date: Mon, 18 Jul 2016 15:23:38 +0200 Subject: [PATCH] [cocos2dx] Closes #378, bounding box will have zero width/height if all attachments are invisible --- spine-cocos2dx/src/spine/SkeletonRenderer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/spine-cocos2dx/src/spine/SkeletonRenderer.cpp b/spine-cocos2dx/src/spine/SkeletonRenderer.cpp index 01f5c6937..d56a3b8de 100644 --- a/spine-cocos2dx/src/spine/SkeletonRenderer.cpp +++ b/spine-cocos2dx/src/spine/SkeletonRenderer.cpp @@ -308,6 +308,7 @@ Rect SkeletonRenderer::getBoundingBox () const { } } Vec2 position = getPosition(); + if (minX == FLT_MAX) minX = minY = maxX = maxY = 0; return Rect(position.x + minX, position.y + minY, maxX - minX, maxY - minY); }