Merge pull request #8824 from Dhilan007/v3-fixcrash

Fix [Node:clipping -> Clipping to RenderTexture] crash
This commit is contained in:
minggo 2014-10-17 22:50:18 +08:00
commit 4a3aa2f359
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();