Module: wine Branch: master Commit: 6c68319863ee68f97e113d291b1501d15b5d095a URL: http://source.winehq.org/git/wine.git/?a=commit;h=6c68319863ee68f97e113d291b...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Oct 24 14:28:08 2011 +0200
mmdevapi/tests: Don't crash on test failure.
---
dlls/mmdevapi/tests/render.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/dlls/mmdevapi/tests/render.c b/dlls/mmdevapi/tests/render.c index 494c00d..ff0aa62 100644 --- a/dlls/mmdevapi/tests/render.c +++ b/dlls/mmdevapi/tests/render.c @@ -719,6 +719,7 @@ static void test_session(void) hr = IMMDevice_Activate(dev, &IID_IAudioClient, CLSCTX_INPROC_SERVER, NULL, (void**)&ses1_ac1); ok(hr == S_OK, "Activation failed with %08x\n", hr); + if (FAILED(hr)) return;
hr = IAudioClient_GetMixFormat(ses1_ac1, &pwfx); ok(hr == S_OK, "GetMixFormat failed: %08x\n", hr); @@ -730,6 +731,11 @@ static void test_session(void) hr = IMMDevice_Activate(dev, &IID_IAudioClient, CLSCTX_INPROC_SERVER, NULL, (void**)&ses1_ac2); ok(hr == S_OK, "Activation failed with %08x\n", hr); + if (FAILED(hr)) + { + IAudioClient_Release(ses1_ac1); + return; + }
hr = IAudioClient_Initialize(ses1_ac2, AUDCLNT_SHAREMODE_SHARED, 0, 5000000, 0, pwfx, &ses1_guid);