Remove command first then erase key

This commit is contained in:
FutureRave 2022-03-10 19:55:44 +00:00
parent 7b3ba9d3d4
commit 880c348827
No known key found for this signature in database
GPG Key ID: E883E2BC9657D955

View File

@ -178,8 +178,8 @@ void command::pre_destroy()
{
for (const auto& [key, val] : command::handlers)
{
handlers.erase(key);
game::native::Cmd_RemoveCommand(key.data());
handlers.erase(key);
}
command::allocator_.clear();