mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
Fix validation crash. (nw)
This commit is contained in:
parent
3afd712637
commit
bfa1dacd17
@ -164,7 +164,9 @@ public:
|
||||
, m_cpu_device(nullptr)
|
||||
, m_last(*this, "m_last", 0)
|
||||
{
|
||||
m_cpu_device = downcast<netlist_mame_cpu_device *>(&static_cast<netlist_mame_device::netlist_mame_t &>(exec()).parent());
|
||||
auto *nl = dynamic_cast<netlist_mame_device::netlist_mame_t *>(&exec());
|
||||
if (nl != nullptr)
|
||||
m_cpu_device = downcast<netlist_mame_cpu_device *>(&nl->parent());
|
||||
}
|
||||
|
||||
ATTR_COLD void reset() override
|
||||
@ -212,7 +214,9 @@ public:
|
||||
, m_cpu_device(nullptr)
|
||||
, m_last(*this, "m_last", 0)
|
||||
{
|
||||
m_cpu_device = downcast<netlist_mame_cpu_device *>(&static_cast<netlist_mame_device::netlist_mame_t &>(exec()).parent());
|
||||
auto *nl = dynamic_cast<netlist_mame_device::netlist_mame_t *>(&exec());
|
||||
if (nl != nullptr)
|
||||
m_cpu_device = downcast<netlist_mame_cpu_device *>(&nl->parent());
|
||||
}
|
||||
|
||||
ATTR_COLD void reset() override
|
||||
|
@ -1448,7 +1448,7 @@ namespace netlist
|
||||
|
||||
COPYASSIGNMOVE(netlist_t, delete)
|
||||
|
||||
~netlist_t() noexcept = default;
|
||||
virtual ~netlist_t() noexcept = default;
|
||||
|
||||
/* run functions */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user