mirror of https://github.com/axmolengine/axmol.git
Solve the crash in CocoStudioComponentsTest.
This commit is contained in:
parent
4fe827e46b
commit
6da0afdd03
|
@ -122,10 +122,12 @@ void ComponentContainer::visit(float delta)
|
|||
{
|
||||
if (_components != nullptr)
|
||||
{
|
||||
CC_SAFE_RETAIN(_owner);
|
||||
for (auto iter = _components->begin(); iter != _components->end(); ++iter)
|
||||
{
|
||||
iter->second->update(delta);
|
||||
}
|
||||
CC_SAFE_RELEASE(_owner);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue