Skip to content

Commit

Permalink
S2: fix ClientCommand not getting unhooked on shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
psychonic committed Oct 16, 2023
1 parent 3955c1b commit 8c394c0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/provider/source2/provider_source2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ void Source2Provider::Notify_DLLInit_Pre(CreateInterfaceFn engineFactory,
void Source2Provider::Notify_DLLShutdown_Pre()
{
ConVar_Unregister();

if (gameclients)
{
SH_REMOVE_HOOK(IServerGameClients, ClientCommand, gameclients, SH_MEMBER(this, &Source2Provider::Hook_ClientCommand), false);
}
}

bool Source2Provider::ProcessVDF(const char* file, char path[], size_t path_len, char alias[], size_t alias_len)
Expand Down

0 comments on commit 8c394c0

Please sign in to comment.