Fabrice Bauzac : winmm: Fix WOD_Open() WID_Open() WAVE_MAPPER no-device case.

Alexandre Julliard julliard at winehq.org
Wed Aug 21 14:09:05 CDT 2013


Module: wine
Branch: master
Commit: 21e0f739bed023a903866a145ee75bdc96e8bce8
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=21e0f739bed023a903866a145ee75bdc96e8bce8

Author: Fabrice Bauzac <libnoon at gmail.com>
Date:   Tue Aug 20 05:37:53 2013 +0200

winmm: Fix WOD_Open() WID_Open() WAVE_MAPPER no-device case.

---

 dlls/winmm/waveform.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/dlls/winmm/waveform.c b/dlls/winmm/waveform.c
index 752e64d..97849ff 100644
--- a/dlls/winmm/waveform.c
+++ b/dlls/winmm/waveform.c
@@ -1228,6 +1228,8 @@ static LRESULT WOD_Open(WINMM_OpenInfo *info)
         WINMM_MMDevice *mmdevice;
 
         if(WINMM_IsMapper(info->req_device)){
+            if (g_outmmdevices_count == 0)
+                return MMSYSERR_BADDEVICEID;
             devices = g_out_mapper_devices;
             mmdevice = read_map(g_out_map, 0);
             lock = &g_devthread_lock;
@@ -1317,6 +1319,8 @@ static LRESULT WID_Open(WINMM_OpenInfo *info)
     HRESULT hr;
 
     if(WINMM_IsMapper(info->req_device)){
+        if (g_inmmdevices_count == 0)
+            return MMSYSERR_BADDEVICEID;
         devices = g_in_mapper_devices;
         mmdevice = read_map(g_in_map, 0);
         lock = &g_devthread_lock;




More information about the wine-cvs mailing list