fixed BatchNode's _children is empty, draw will crash

This commit is contained in:
2youyou2 2013-11-18 13:23:38 +08:00
parent d3eab6d282
commit 4f2603f69c
1 changed files with 5 additions and 0 deletions

View File

@ -163,6 +163,11 @@ void BatchNode::visit()
void BatchNode::draw()
{
if (_children == nullptr)
{
return;
}
CC_NODE_DRAW_SETUP();
for(auto object : *_children)