From e60ac24e5d53c5c5fd084480f28594a9d5092990 Mon Sep 17 00:00:00 2001 From: Justin Godesky Date: Mon, 12 Oct 2015 20:42:08 -0400 Subject: [PATCH] Check that textureAtlas isn't null before removing all quads in SpriteBatchNode See issue #14122. --- cocos/2d/CCSpriteBatchNode.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/2d/CCSpriteBatchNode.cpp b/cocos/2d/CCSpriteBatchNode.cpp index 96a78e6d83..53086cedd0 100644 --- a/cocos/2d/CCSpriteBatchNode.cpp +++ b/cocos/2d/CCSpriteBatchNode.cpp @@ -240,7 +240,7 @@ void SpriteBatchNode::removeAllChildrenWithCleanup(bool doCleanup) Node::removeAllChildrenWithCleanup(doCleanup); _descendants.clear(); - _textureAtlas->removeAllQuads(); + if (_textureAtlas) {_textureAtlas->removeAllQuads();} } //override sortAllChildren