Fix [Node:clipping -> Clipping to RenderTexture] crash

This commit is contained in:
Dhilan007 2014-10-17 18:48:18 +08:00
parent 8b0f61dfb0
commit b5f91d17da
1 changed files with 7 additions and 3 deletions

View File

@ -979,12 +979,16 @@ std::string ClippingToRenderTextureTest::subtitle() const
void ClippingToRenderTextureTest::setup()
{
auto button = MenuItemFont::create("Reproduce bug", [&](Ref *sender) {
std::vector<Node*> nodes;
enumerateChildren("remove me [0-9]", [&](Node *node) {
this->removeChild(node);
this->reproduceBug();
nodes.push_back(node);
return false;
});
for (auto node : nodes)
{
this->removeChild(node);
}
);
this->reproduceBug();
});
auto s = Director::getInstance()->getWinSize();