From 880c348827c35ee7d1add76a702e154c6dfe583c Mon Sep 17 00:00:00 2001 From: FutureRave Date: Thu, 10 Mar 2022 19:55:44 +0000 Subject: [PATCH] Remove command first then erase key --- src/module/command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/module/command.cpp b/src/module/command.cpp index e2a1860..6cf152e 100644 --- a/src/module/command.cpp +++ b/src/module/command.cpp @@ -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();