mirror of
https://github.com/holub/mame
synced 2025-06-07 13:23:50 +03:00
audit.c: fixed a crash occurring when trying to mount
a CHD from the internal UI. [Fabio Priuli] out of whatsnew: this is the correct fix which replaces the hacky workaround that I had submitted earlier today...
This commit is contained in:
parent
8923954751
commit
06cc1e484d
@ -462,16 +462,10 @@ audit_record *media_auditor::audit_one_disk(const rom_entry *rom, const char *lo
|
|||||||
{
|
{
|
||||||
// allocate and append a new record
|
// allocate and append a new record
|
||||||
audit_record &record = m_record_list.append(*global_alloc(audit_record(*rom, audit_record::MEDIA_DISK)));
|
audit_record &record = m_record_list.append(*global_alloc(audit_record(*rom, audit_record::MEDIA_DISK)));
|
||||||
chd_error err;
|
|
||||||
|
|
||||||
// open the disk
|
// open the disk
|
||||||
chd_file source;
|
chd_file source;
|
||||||
if (&m_enumerator.driver() != NULL)
|
chd_error err = chd_error(open_disk_image(m_enumerator.options(), &m_enumerator.driver(), rom, source, locationtag));
|
||||||
err = chd_error(open_disk_image(m_enumerator.options(), &m_enumerator.driver(), rom, source, locationtag));
|
|
||||||
else
|
|
||||||
// FIXME: this shouldn't be needed, but when trying to load a CDROM from the internal UI for some reason
|
|
||||||
// the enumerator is created with NULL driver() and we have to catch it by passing through the current options
|
|
||||||
err = chd_error(open_disk_image(m_enumerator.options(), &m_enumerator.driver(m_enumerator.find(m_enumerator.options().system_name())), rom, source, locationtag));
|
|
||||||
|
|
||||||
// if we succeeded, get the hashes
|
// if we succeeded, get the hashes
|
||||||
if (err == CHDERR_NONE)
|
if (err == CHDERR_NONE)
|
||||||
|
@ -134,6 +134,7 @@ void ui_menu_control_device_image::load_software_part()
|
|||||||
std::string temp_name = std::string(sld->list_name()).append(":").append(swi->shortname()).append(":").append(swp->name());
|
std::string temp_name = std::string(sld->list_name()).append(":").append(swi->shortname()).append(":").append(swp->name());
|
||||||
|
|
||||||
driver_enumerator drivlist(machine().options(), machine().options().system_name());
|
driver_enumerator drivlist(machine().options(), machine().options().system_name());
|
||||||
|
drivlist.next();
|
||||||
media_auditor auditor(drivlist);
|
media_auditor auditor(drivlist);
|
||||||
media_auditor::summary summary = auditor.audit_software(sld->list_name(), (software_info *)swi, AUDIT_VALIDATE_FAST);
|
media_auditor::summary summary = auditor.audit_software(sld->list_name(), (software_info *)swi, AUDIT_VALIDATE_FAST);
|
||||||
// if everything looks good, load software
|
// if everything looks good, load software
|
||||||
|
Loading…
Reference in New Issue
Block a user