mmdevapi: Don't crash if a driver fails to load.

This commit is contained in:
Andrew Eikum 2011-06-17 15:49:51 -05:00 committed by Alexandre Julliard
parent 096fb434eb
commit f50829c36e
1 changed files with 3 additions and 0 deletions

View File

@ -824,6 +824,9 @@ HRESULT MMDevEnum_Create(REFIID riid, void **ppv)
{
MMDevEnumImpl *This = MMDevEnumerator;
if(!drvs.pGetAudioEndpoint)
return AUDCLNT_E_SERVICE_NOT_RUNNING;
if (!This)
{
This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This));