Stefan Leichter : mmdevapi/tests: Fix a crash when function IMMDevice_Activate fails.

Alexandre Julliard julliard at winehq.org
Thu Jul 11 14:42:13 CDT 2013


Module: wine
Branch: master
Commit: 55972526067ea6d9452aa2d46b7bfffe64d89752
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=55972526067ea6d9452aa2d46b7bfffe64d89752

Author: Stefan Leichter <Stefan.Leichter at camline.com>
Date:   Wed Jul 10 22:34:25 2013 +0200

mmdevapi/tests: Fix a crash when function IMMDevice_Activate fails.

---

 dlls/mmdevapi/tests/capture.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/dlls/mmdevapi/tests/capture.c b/dlls/mmdevapi/tests/capture.c
index feedfde..1873735 100644
--- a/dlls/mmdevapi/tests/capture.c
+++ b/dlls/mmdevapi/tests/capture.c
@@ -915,6 +915,8 @@ static void test_volume_dependence(void)
     hr = IMMDevice_Activate(dev, &IID_IAudioClient, CLSCTX_INPROC_SERVER,
             NULL, (void**)&ac);
     ok(hr == S_OK, "Activation failed with %08x\n", hr);
+    if(hr != S_OK)
+        return;
 
     hr = IAudioClient_GetMixFormat(ac, &fmt);
     ok(hr == S_OK, "GetMixFormat failed: %08x\n", hr);




More information about the wine-cvs mailing list