Commit 78b96c87 authored by Thomas Faber's avatar Thomas Faber Committed by Alexandre Julliard

dsound: Do not call CoUninitialize if CoInitialize failed.

parent cf45bec6
...@@ -178,7 +178,8 @@ static HRESULT get_mmdevenum(IMMDeviceEnumerator **devenum) ...@@ -178,7 +178,8 @@ static HRESULT get_mmdevenum(IMMDeviceEnumerator **devenum)
hr = CoCreateInstance(&CLSID_MMDeviceEnumerator, NULL, hr = CoCreateInstance(&CLSID_MMDeviceEnumerator, NULL,
CLSCTX_INPROC_SERVER, &IID_IMMDeviceEnumerator, (void**)devenum); CLSCTX_INPROC_SERVER, &IID_IMMDeviceEnumerator, (void**)devenum);
if(FAILED(hr)){ if(FAILED(hr)){
CoUninitialize(); if(SUCCEEDED(init_hr))
CoUninitialize();
*devenum = NULL; *devenum = NULL;
ERR("CoCreateInstance failed: %08x\n", hr); ERR("CoCreateInstance failed: %08x\n", hr);
return hr; return hr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment