mirror of
https://github.com/holub/mame
synced 2025-04-25 09:50:04 +03:00
Trigger a fatal error when console was asked but the console plugin not found. (#2914)
* Add a message when the console plugin is not found, rather than crash. In absence of the console plugin, the option entry was not found in m_plugins, making the set_value() crash when deferencing the result of get_entry(). Instead, an error message is logged telling the plugin is not found. * Trigger a fatal error when console was asked but the console plugin not found.
This commit is contained in:
parent
6fb1268372
commit
8b341d8795
@ -155,7 +155,14 @@ void mame_machine_manager::start_luaengine()
|
||||
}
|
||||
if (options().console())
|
||||
{
|
||||
m_plugins->set_value("console", "1", OPTION_PRIORITY_CMDLINE);
|
||||
if (m_plugins->exists(OPTION_CONSOLE))
|
||||
{
|
||||
m_plugins->set_value(OPTION_CONSOLE, "1", OPTION_PRIORITY_CMDLINE);
|
||||
}
|
||||
else
|
||||
{
|
||||
fatalerror("Console plugin not found.\n");
|
||||
}
|
||||
}
|
||||
|
||||
m_lua->initialize();
|
||||
|
Loading…
Reference in New Issue
Block a user