winealsa.drv: If there are no devices, there is also no default device.
This commit is contained in:
parent
56212ce215
commit
366f54110a
|
@ -390,6 +390,13 @@ HRESULT WINAPI AUDDRV_GetEndpointIDs(EDataFlow flow, WCHAR ***ids, char ***keys,
|
||||||
if(FAILED(hr))
|
if(FAILED(hr))
|
||||||
return hr;
|
return hr;
|
||||||
|
|
||||||
|
if(*num == 0)
|
||||||
|
{
|
||||||
|
*ids = NULL;
|
||||||
|
*keys = NULL;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
*ids = HeapAlloc(GetProcessHeap(), 0, (*num + 1) * sizeof(WCHAR *));
|
*ids = HeapAlloc(GetProcessHeap(), 0, (*num + 1) * sizeof(WCHAR *));
|
||||||
*keys = HeapAlloc(GetProcessHeap(), 0, (*num + 1) * sizeof(char *));
|
*keys = HeapAlloc(GetProcessHeap(), 0, (*num + 1) * sizeof(char *));
|
||||||
if(!*ids || !*keys){
|
if(!*ids || !*keys){
|
||||||
|
|
Loading…
Reference in New Issue