Fix crash on "status" when host_client lookup fails
Block execution of the "status" command on the sourcetv bot, if the address of the host_client pointer failed to be found. This at least prevents the known crash in Host_Client_Printf if we can't work around it.
This commit is contained in:
parent
df34652818
commit
6942d4f8ce
@ -194,7 +194,13 @@ void HLTVServerWrapper::OnHLTVServerShutdown()
|
||||
bool HLTVServerWrapper::OnHLTVBotExecuteStringCommand(const char *s)
|
||||
{
|
||||
if (!host_client)
|
||||
RETURN_META_VALUE(MRES_IGNORED, 0);
|
||||
{
|
||||
// Block crash in status command.
|
||||
if (!Q_stricmp(s, "status"))
|
||||
RETURN_META_VALUE(MRES_SUPERCEDE, 0);
|
||||
else
|
||||
RETURN_META_VALUE(MRES_IGNORED, 0);
|
||||
}
|
||||
|
||||
IClient *pClient = META_IFACEPTR(IClient);
|
||||
if (!pClient)
|
||||
|
Loading…
Reference in New Issue
Block a user