diff --git a/src/emu/emuopts.c b/src/emu/emuopts.c index 46498f61839..2a0b8ff2196 100644 --- a/src/emu/emuopts.c +++ b/src/emu/emuopts.c @@ -401,7 +401,7 @@ bool emu_options::parse_command_line(int argc, char *argv[], astring &error_stri // remove any existing device options remove_device_options(); result = parse_slot_devices(argc, argv, error_string, NULL, NULL); - if (exists(OPTION_RAMSIZE)) + if (exists(OPTION_RAMSIZE) && old_system_name.len()!=0) set_value(OPTION_RAMSIZE, "", OPTION_PRIORITY_CMDLINE, error_string); } return result; diff --git a/src/emu/mame.c b/src/emu/mame.c index 25969b4545a..c36b6ea77cb 100644 --- a/src/emu/mame.c +++ b/src/emu/mame.c @@ -159,13 +159,6 @@ int mame_execute(emu_options &options, osd_interface &osd) started_empty = true; } - // otherwise, perform validity checks before anything else - else - { - validity_checker valid(options); - valid.check_shared_source(*system); - } - firstgame = false; // parse any INI files as the first thing @@ -175,6 +168,13 @@ int mame_execute(emu_options &options, osd_interface &osd) astring errors; options.parse_standard_inis(errors); } + // otherwise, perform validity checks before anything else + if (system != NULL) + { + validity_checker valid(options); + valid.check_shared_source(*system); + } + // create the machine configuration machine_config config(*system, options);