Previous 199869 Revisions Next

r21115 Saturday 16th February, 2013 at 08:02:08 UTC by Fabio Priuli
(MESS) fix some crash on exit. nw.
[src/mess/machine]md_slot.c nes_slot.c

trunk/src/mess/machine/md_slot.c
r21114r21115
538538
539539void base_md_cart_slot_device::call_unload()
540540{
541   if (m_cart->get_nvram_size())
541   if (m_cart && m_cart->get_nvram_size())
542542      battery_save(m_cart->get_nvram_base(), m_cart->get_nvram_size());
543543}
544544
trunk/src/mess/machine/nes_slot.c
r21114r21115
11#include "emu.h"
2#include "hashfile.h"
23#include "machine/nes_slot.h"
3#include "hashfile.h"
44
55#define NES_BATTERY_SIZE 0x2000
66
r21114r21115
11121112
11131113void nes_cart_slot_device::call_unload()
11141114{
1115   if (m_cart->get_battery_size())
1115   if (m_cart && m_cart->get_battery_size())
11161116      battery_save(m_cart->get_battery_base(), m_cart->get_battery_size());
1117   if (m_cart->get_mapper_bram_size())
1117   if (m_cart && m_cart->get_mapper_bram_size())
11181118      battery_save(m_cart->get_mapper_bram_base(), m_cart->get_mapper_bram_size());
11191119}
11201120

Previous 199869 Revisions Next


© 1997-2024 The MAME Team