From 51af5b7f1d1b42fea0510b4baa703b08e72f1910 Mon Sep 17 00:00:00 2001 From: "R. Belmont" Date: Sun, 3 Feb 2013 17:09:57 +0000 Subject: [PATCH] (MESS) Properly close the old image when swapping CHD-CDs [Steve Leung] --- src/emu/imagedev/chd_cd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/emu/imagedev/chd_cd.c b/src/emu/imagedev/chd_cd.c index a8a98ccdbe9..8db02a40b66 100644 --- a/src/emu/imagedev/chd_cd.c +++ b/src/emu/imagedev/chd_cd.c @@ -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(); }