diff options
author | 2019-07-18 16:14:02 +0200 | |
---|---|---|
committer | 2019-07-18 10:14:02 -0400 | |
commit | a14ec2ca5c5613e032159ee1c854a99e19a8e7d7 (patch) | |
tree | 739565338a6e30a46ed4c9a7143a541cc8741d0a /src/emu/emuopts.h | |
parent | 7939bb9b7865e6aed11da705f13a8e1ed9c7206e (diff) |
Fix segfault when trying to access some image option that does not exists (#5352)
* emuopts.h: Add method to check if image option exists
* image.cpp: Avoid to require image_option if it does not exists
Diffstat (limited to 'src/emu/emuopts.h')
-rw-r--r-- | src/emu/emuopts.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/emu/emuopts.h b/src/emu/emuopts.h index c16e9c24567..a619b51a65c 100644 --- a/src/emu/emuopts.h +++ b/src/emu/emuopts.h @@ -480,6 +480,7 @@ public: bool has_slot_option(const std::string &device_name) const { return find_slot_option(device_name) ? true : false; } const ::image_option &image_option(const std::string &device_name) const; ::image_option &image_option(const std::string &device_name); + bool has_image_option(const std::string &device_name) const { return m_image_options.find(device_name) != m_image_options.end(); } protected: virtual void command_argument_processed() override; |