diff --git a/Server/Source/core_impl.hpp b/Server/Source/core_impl.hpp index 69ad2b243..df3a5eb62 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)