diff options
author | 2011-08-30 08:21:23 +0000 | |
---|---|---|
committer | 2011-08-30 08:21:23 +0000 | |
commit | 69374d9553b0232288608401e166c688c874d396 (patch) | |
tree | 049876424c8c9448c392a0c9eb221529b9925cff /src/emu/audit.c | |
parent | 610a2d921d4d0ba195d99a34dc001413cd92cb42 (diff) |
fixed segfault when using -verifysamples [Fabio Priuli]
the offending bit was the call of record->shared_source() without having explicitly set m_shared_source to NULL.
it might be worth to initialize m_shared_source to NULL, but I was not 100% sure about effects on other rom verification routines, so for the moment I simply set it to NULL when verifying samples
Diffstat (limited to 'src/emu/audit.c')
-rw-r--r-- | src/emu/audit.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/emu/audit.c b/src/emu/audit.c index a0df5b9a619..bb89bf7e25b 100644 --- a/src/emu/audit.c +++ b/src/emu/audit.c @@ -261,6 +261,7 @@ media_auditor::summary media_auditor::audit_samples() else record.set_status(audit_record::STATUS_NOT_FOUND, audit_record::SUBSTATUS_NOT_FOUND); } + record.set_shared_source(NULL); } } } @@ -339,7 +340,7 @@ media_auditor::summary media_auditor::summarize(const char *name, astring *strin if (string != NULL) { const rom_source *shared_source = record->shared_source(); - if (shared_source == NULL) string->catprintf("NOT FOUND\n"); + if (shared_source == NULL || shared_source->shortname() == NULL) string->catprintf("NOT FOUND\n"); else string->catprintf("NOT FOUND (%s)\n", shared_source->shortname()); } break; |