mirror of
https://github.com/mamedev/mame.git
synced 2024-11-16 07:48:32 +01:00
(MESS) fix some crash on exit. nw.
This commit is contained in:
parent
a571252867
commit
e99fd1b730
2 changed files with 4 additions and 4 deletions
|
@ -538,7 +538,7 @@ int base_md_cart_slot_device::load_nonlist()
|
|||
|
||||
void base_md_cart_slot_device::call_unload()
|
||||
{
|
||||
if (m_cart->get_nvram_size())
|
||||
if (m_cart && m_cart->get_nvram_size())
|
||||
battery_save(m_cart->get_nvram_base(), m_cart->get_nvram_size());
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "emu.h"
|
||||
#include "machine/nes_slot.h"
|
||||
#include "hashfile.h"
|
||||
#include "machine/nes_slot.h"
|
||||
|
||||
#define NES_BATTERY_SIZE 0x2000
|
||||
|
||||
|
@ -1112,9 +1112,9 @@ bool nes_cart_slot_device::call_load()
|
|||
|
||||
void nes_cart_slot_device::call_unload()
|
||||
{
|
||||
if (m_cart->get_battery_size())
|
||||
if (m_cart && m_cart->get_battery_size())
|
||||
battery_save(m_cart->get_battery_base(), m_cart->get_battery_size());
|
||||
if (m_cart->get_mapper_bram_size())
|
||||
if (m_cart && m_cart->get_mapper_bram_size())
|
||||
battery_save(m_cart->get_mapper_bram_base(), m_cart->get_mapper_bram_size());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue