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

This commit is contained in:
Stefan Leichter 2013-07-10 22:34:25 +02:00 committed by Alexandre Julliard
parent 0746767d91
commit 5597252606

View file

@ -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);