diff --git a/extensions/tf2/conditions.cpp b/extensions/tf2/conditions.cpp index e02190c9..0bc18f46 100644 --- a/extensions/tf2/conditions.cpp +++ b/extensions/tf2/conditions.cpp @@ -42,10 +42,11 @@ struct CondChangeData_t int newConds; }; -void HandleCondChange(void *pData) +static void HandleCondChange(void *pData) { auto *pCondData = reinterpret_cast(pData); g_CondMgr.ProcessCondChange(pCondData); + delete pCondData; } void PlayerConditionsMgr::ProcessCondChange(CondChangeData_t *pCondData) @@ -97,8 +98,6 @@ void PlayerConditionsMgr::ProcessCondChange(CondChangeData_t *pCondData) } } } - - delete pCondData; } template