Revert "(nw) Fixed random crashing when swapping one slot device with another."

This reverts commit 9968fc71b0.

This hides the underlying problem that the options structure is getting
out-of-sync.  It's losing the image option but not the underlying
option.  Masking the problem doesn't fix it.
This commit is contained in:
Vas Crabb 2017-08-06 21:47:53 +10:00
parent 336a636aed
commit 6ef4a1452d
3 changed files with 1 additions and 20 deletions

View File

@ -1021,23 +1021,6 @@ slot_option &emu_options::slot_option(const std::string &device_name)
}
//-------------------------------------------------
// find_image_option
//-------------------------------------------------
const image_option *emu_options::find_image_option(const std::string &device_name) const
{
auto iter = m_image_options.find(device_name);
return iter != m_image_options.end() ? iter->second : nullptr;
}
image_option *emu_options::find_image_option(const std::string &device_name)
{
auto iter = m_image_options.find(device_name);
return iter != m_image_options.end() ? iter->second : nullptr;
}
//-------------------------------------------------
// image_option
//-------------------------------------------------

View File

@ -478,8 +478,6 @@ 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);
::image_option *find_image_option(const std::string &device_name);
const ::image_option *find_image_option(const std::string &device_name) const;
protected:
virtual void command_argument_processed() override;

View File

@ -209,7 +209,7 @@ void image_manager::options_extract()
}
// and set the option (provided that it hasn't been removed out from under us)
if (machine().options().find_image_option(image.instance_name()))
if (machine().options().exists(image.instance_name()))
machine().options().image_option(image.instance_name()).specify(std::move(image_opt));
}
}