(MESS) Properly close the old image when swapping CHD-CDs [Steve Leung]

This commit is contained in:
R. Belmont 2013-02-03 17:09:57 +00:00
parent e2eaf6bc01
commit 51af5b7f1d

View File

@ -101,6 +101,8 @@ void cdrom_image_device::device_stop()
{
if (m_cdrom_handle)
cdrom_close(m_cdrom_handle);
if( m_self_chd.opened() )
m_self_chd.close();
}
bool cdrom_image_device::call_load()
@ -148,4 +150,6 @@ void cdrom_image_device::call_unload()
assert(m_cdrom_handle);
cdrom_close(m_cdrom_handle);
m_cdrom_handle = NULL;
if( m_self_chd.opened() )
m_self_chd.close();
}