Fix spine's crash due to destroy called after animation play complete. (#18342)

This commit is contained in:
bofeng-song
2025-02-17 23:01:47 +08:00
committed by GitHub
parent 27f4ae172a
commit 41d844713e
@@ -83,6 +83,13 @@ void MiddlewareManager::update(float dt) {
}
void MiddlewareManager::render(float dt) {
for (auto &iter: _operateCacheMap) {
auto it = std::find(_updateList.begin(), _updateList.end(), iter.first);
if (!iter.second && it != _updateList.end()) {
_updateList.erase(it);
}
}
for (auto it : _mbMap) {
auto *buffer = it.second;
if (buffer) {