Fix crashbug in bind system

Restore old behavior around the bind's Get() function, return "" if
there is no bind. Fixes #730.
This commit is contained in:
heinrich5991 2017-04-13 00:19:19 +02:00 committed by Learath2
parent 38cd5e89a5
commit 1b88017fc5

View file

@ -88,7 +88,7 @@ void CBinds::UnbindAll()
const char *CBinds::Get(int KeyID)
{
if(KeyID > 0 && KeyID < KEY_LAST)
if(KeyID > 0 && KeyID < KEY_LAST && m_apKeyBindings[KeyID])
return m_apKeyBindings[KeyID];
return "";
}