mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix use-after-free on unbind
This commit is contained in:
parent
1b88017fc5
commit
921cfb29f8
|
@ -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])
|
||||
|
|
Loading…
Reference in a new issue