diff --git a/loader/src/utils/cocos.cpp b/loader/src/utils/cocos.cpp index 2ead3eef..cc43087a 100644 --- a/loader/src/utils/cocos.cpp +++ b/loader/src/utils/cocos.cpp @@ -253,7 +253,7 @@ bool WeakRefPool::isManaged(CCObject* obj) { } void WeakRefPool::manage(CCObject* obj) { - if (obj) { + if (obj && !m_pool.contains(obj)) { obj->retain(); m_pool.insert(obj); }