From 7dba540b97a8fd1cf50b06b7f8ba8b49b059983e Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Thu, 22 Aug 2013 21:45:42 -0400 Subject: [PATCH] Fixed crash in OnSayCommand_Post with console chat, pass console chat (bug 5864, r=voided); --HG-- extra : rebase_source : 3090e700ea04a1b2cc6a92c727e3bb58df69500d --- core/ChatTriggers.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/ChatTriggers.cpp b/core/ChatTriggers.cpp index 879291d8c..5699a445f 100644 --- a/core/ChatTriggers.cpp +++ b/core/ChatTriggers.cpp @@ -331,17 +331,17 @@ void ChatTriggers::OnSayCommand_Post() { int client = g_ConCmds.GetCommandClient(); - if (m_bWillProcessInPost) - { - /* Reset this for re-entrancy */ - m_bWillProcessInPost = false; - + if (m_bWillProcessInPost && client > 0) + { /* Execute the cached command */ unsigned int old = SetReplyTo(SM_REPLY_CHAT); serverpluginhelpers->ClientCommand(PEntityOfEntIndex(client), m_ToExecute); SetReplyTo(old); } + /* Reset this for re-entrancy */ + m_bWillProcessInPost = false; + if (m_bPluginIgnored) { m_bPluginIgnored = false;