From 6be5a20c4bae8eb1fbc7735ec726bbd046e59ff4 Mon Sep 17 00:00:00 2001 From: Hual Date: Thu, 21 Sep 2023 11:03:53 +0300 Subject: [PATCH] Clear components in a separate pass --- Server/Source/core_impl.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Server/Source/core_impl.hpp b/Server/Source/core_impl.hpp index df3a5eb62..69ad2b243 100644 --- a/Server/Source/core_impl.hpp +++ b/Server/Source/core_impl.hpp @@ -277,8 +277,8 @@ class ComponentList : public IComponentList pair.second->onFree(it->second); }); it->second->free(); - it = components.erase(it); } + components.clear(); } auto add(IComponent* component)