Fix crash when combomap isn't defined in config file.

This commit is contained in:
Stephen Anthony 2019-12-26 17:51:08 -03:30
parent b276a1e6a7
commit b51fd4d07a
1 changed files with 23 additions and 16 deletions

View File

@ -1093,6 +1093,8 @@ void EventHandler::setComboMap()
{
// Get combo count, which should be the first int in the list
// If it isn't, then we treat the entire list as invalid
try
{
string key;
buf >> key;
if(stoi(key) == COMBO_SIZE)
@ -1117,6 +1119,11 @@ void EventHandler::setComboMap()
else
ERASE_ALL();
}
catch(...)
{
ERASE_ALL();
}
}
saveComboMapping();
}