Bernhard Loos : winealsa.drv: If there are no devices, there is also no default device.
Alexandre Julliard
julliard at winehq.org
Fri Sep 9 10:56:48 CDT 2011
Module: wine
Branch: master
Commit: 366f54110a54b2a14c851ef35a4e2de64a388da2
URL: http://source.winehq.org/git/wine.git/?a=commit;h=366f54110a54b2a14c851ef35a4e2de64a388da2
Author: Bernhard Loos <bernhardloos at googlemail.com>
Date: Fri Sep 9 15:49:16 2011 +0200
winealsa.drv: If there are no devices, there is also no default device.
---
dlls/winealsa.drv/mmdevdrv.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/dlls/winealsa.drv/mmdevdrv.c b/dlls/winealsa.drv/mmdevdrv.c
index 0c47876..1d1ce6f 100644
--- a/dlls/winealsa.drv/mmdevdrv.c
+++ b/dlls/winealsa.drv/mmdevdrv.c
@@ -390,6 +390,13 @@ HRESULT WINAPI AUDDRV_GetEndpointIDs(EDataFlow flow, WCHAR ***ids, char ***keys,
if(FAILED(hr))
return hr;
+ if(*num == 0)
+ {
+ *ids = NULL;
+ *keys = NULL;
+ return S_OK;
+ }
+
*ids = HeapAlloc(GetProcessHeap(), 0, (*num + 1) * sizeof(WCHAR *));
*keys = HeapAlloc(GetProcessHeap(), 0, (*num + 1) * sizeof(char *));
if(!*ids || !*keys){
More information about the wine-cvs
mailing list