mirror of https://github.com/stella-emu/stella.git
Fix crash when combomap isn't defined in config file.
This commit is contained in:
parent
b276a1e6a7
commit
b51fd4d07a
|
@ -1093,6 +1093,8 @@ void EventHandler::setComboMap()
|
||||||
{
|
{
|
||||||
// Get combo count, which should be the first int in the list
|
// Get combo count, which should be the first int in the list
|
||||||
// If it isn't, then we treat the entire list as invalid
|
// If it isn't, then we treat the entire list as invalid
|
||||||
|
try
|
||||||
|
{
|
||||||
string key;
|
string key;
|
||||||
buf >> key;
|
buf >> key;
|
||||||
if(stoi(key) == COMBO_SIZE)
|
if(stoi(key) == COMBO_SIZE)
|
||||||
|
@ -1117,6 +1119,11 @@ void EventHandler::setComboMap()
|
||||||
else
|
else
|
||||||
ERASE_ALL();
|
ERASE_ALL();
|
||||||
}
|
}
|
||||||
|
catch(...)
|
||||||
|
{
|
||||||
|
ERASE_ALL();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
saveComboMapping();
|
saveComboMapping();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue