mirror of https://github.com/axmolengine/axmol.git
Merge pull request #8824 from Dhilan007/v3-fixcrash
Fix [Node:clipping -> Clipping to RenderTexture] crash
This commit is contained in:
commit
4a3aa2f359
|
@ -979,12 +979,16 @@ std::string ClippingToRenderTextureTest::subtitle() const
|
||||||
void ClippingToRenderTextureTest::setup()
|
void ClippingToRenderTextureTest::setup()
|
||||||
{
|
{
|
||||||
auto button = MenuItemFont::create("Reproduce bug", [&](Ref *sender) {
|
auto button = MenuItemFont::create("Reproduce bug", [&](Ref *sender) {
|
||||||
|
std::vector<Node*> nodes;
|
||||||
enumerateChildren("remove me [0-9]", [&](Node *node) {
|
enumerateChildren("remove me [0-9]", [&](Node *node) {
|
||||||
this->removeChild(node);
|
nodes.push_back(node);
|
||||||
this->reproduceBug();
|
|
||||||
return false;
|
return false;
|
||||||
|
});
|
||||||
|
for (auto node : nodes)
|
||||||
|
{
|
||||||
|
this->removeChild(node);
|
||||||
}
|
}
|
||||||
);
|
this->reproduceBug();
|
||||||
});
|
});
|
||||||
|
|
||||||
auto s = Director::getInstance()->getWinSize();
|
auto s = Director::getInstance()->getWinSize();
|
||||||
|
|
Loading…
Reference in New Issue