Fix use-after-free on unbind

This commit is contained in:
heinrich5991 2017-04-13 01:47:17 +02:00 committed by Learath2
parent 1b88017fc5
commit 921cfb29f8

View file

@ -39,7 +39,10 @@ void CBinds::Bind(int KeyID, const char *pStr)
return;
if(m_apKeyBindings[KeyID])
{
mem_free(m_apKeyBindings[KeyID]);
m_apKeyBindings[KeyID] = 0;
}
char aBuf[256];
if(!pStr[0])