[DSOUND]
authorThomas Faber <thomas.faber@reactos.org>
Tue, 29 Jul 2014 07:32:47 +0000 (07:32 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Tue, 29 Jul 2014 07:32:47 +0000 (07:32 +0000)
- Do not call CoUninitialize if CoInitialize failed.
ROSTESTS-123

svn path=/trunk/; revision=63756

reactos/dll/directx/wine/dsound/dsound_main.c

index 43e1432..c25418d 100644 (file)
@@ -150,7 +150,8 @@ static HRESULT get_mmdevenum(IMMDeviceEnumerator **devenum)
     hr = CoCreateInstance(&CLSID_MMDeviceEnumerator, NULL,
             CLSCTX_INPROC_SERVER, &IID_IMMDeviceEnumerator, (void**)devenum);
     if(FAILED(hr)){
-        CoUninitialize();
+        if(SUCCEEDED(init_hr))
+            CoUninitialize();
         *devenum = NULL;
         ERR("CoCreateInstance failed: %08x\n", hr);
         return hr;