Fixed STV crashing regression, make m_cart_reg explicitly nullptr if not initialized (nw)

This commit is contained in:
angelosa 2017-10-03 18:46:42 +02:00
parent 238f863771
commit 28b4d74ada
2 changed files with 9 additions and 1 deletions

View File

@ -572,7 +572,8 @@ void saturn_state::smpc_comreg_exec(address_space &space, uint8_t data, uint8_t
case 0x0a:
case 0x0b:
popmessage ("SMPC: NETLINK %s, contact MAMEdev",(data & 1) ? "off" : "on");
break; case 0x0d:
break;
case 0x0d:
if(LOG_SMPC) printf ("SMPC: System Reset\n");
smpc_system_reset();
break;

View File

@ -1158,11 +1158,18 @@ MACHINE_RESET_MEMBER(stv_state,stv)
m_cart_reg[0] = memregion("cart");
if (m_cart2)
m_cart_reg[1] = memregion(region_tag.assign(m_cart2->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
else
m_cart_reg[1] = nullptr;
if (m_cart3)
m_cart_reg[2] = memregion(region_tag.assign(m_cart3->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
else
m_cart_reg[2] = nullptr;
if (m_cart4)
m_cart_reg[3] = memregion(region_tag.assign(m_cart4->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
else
m_cart_reg[3] = nullptr;
m_en_68k = 0;
m_NMI_reset = 0;