Fix OnPlayerRunCmd crashing with invalid CUserCmd ptr. (#693)
This commit is contained in:
parent
7e898ee530
commit
5d234bb9d6
@ -191,6 +191,11 @@ void CHookManager::PlayerRunCmdHook(int client, bool post)
|
||||
|
||||
void CHookManager::PlayerRunCmd(CUserCmd *ucmd, IMoveHelper *moveHelper)
|
||||
{
|
||||
if (!ucmd)
|
||||
{
|
||||
RETURN_META(MRES_IGNORED);
|
||||
}
|
||||
|
||||
if (m_usercmdsFwd->GetFunctionCount() == 0)
|
||||
{
|
||||
RETURN_META(MRES_IGNORED);
|
||||
@ -254,6 +259,11 @@ void CHookManager::PlayerRunCmd(CUserCmd *ucmd, IMoveHelper *moveHelper)
|
||||
|
||||
void CHookManager::PlayerRunCmdPost(CUserCmd *ucmd, IMoveHelper *moveHelper)
|
||||
{
|
||||
if (!ucmd)
|
||||
{
|
||||
RETURN_META(MRES_IGNORED);
|
||||
}
|
||||
|
||||
if (m_usercmdsPostFwd->GetFunctionCount() == 0)
|
||||
{
|
||||
RETURN_META(MRES_IGNORED);
|
||||
|
Loading…
Reference in New Issue
Block a user