winealsa.drv: If there are no devices, there is also no default device.

This commit is contained in:
Bernhard Loos 2011-09-09 15:49:16 +02:00 committed by Alexandre Julliard
parent 56212ce215
commit 366f54110a
1 changed files with 7 additions and 0 deletions

View File

@ -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){