diff options
author | 2017-06-10 11:49:12 +0200 | |
---|---|---|
committer | 2017-06-10 11:49:12 +0200 | |
commit | 1c5d2e9466c6b5592b311d9f7a22d693e6a2f0c4 (patch) | |
tree | d055352be9504e03a7f078d2699e6b4c007e0167 | |
parent | 6975b237af5248e5dc260ca0477c480f64b3980e (diff) |
Fix vas' problem, region_length() is expected to return 0 if the region doesn't exist, not crash (nw)
-rw-r--r-- | src/emu/validity.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/emu/validity.h b/src/emu/validity.h index de599199b73..8460ee4a7c0 100644 --- a/src/emu/validity.h +++ b/src/emu/validity.h @@ -44,7 +44,7 @@ public: // helpers for devices void validate_tag(const char *tag); - int region_length(const char *tag) { return m_region_map.find(tag)->second; } + int region_length(const char *tag) { auto i = m_region_map.find(tag); return i == m_region_map.end() ? 0 : i->second; } // generic registry of already-checked stuff bool already_checked(const char *string) { return !m_already_checked.insert(string).second; } |