xaudio2_7: Check return of IAudioClient_Start (Coverity).

Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
André Hentschel 2015-12-22 19:34:57 +01:00 committed by Alexandre Julliard
parent 2cff59ed5c
commit 35eebeef0f
1 changed files with 7 additions and 1 deletions

View File

@ -1689,7 +1689,13 @@ static HRESULT WINAPI IXAudio2Impl_CreateMasteringVoice(IXAudio2 *iface,
goto exit;
}
IAudioClient_Start(This->aclient);
hr = IAudioClient_Start(This->aclient);
if (FAILED(hr))
{
WARN("Start(IAudioClient) failed: %08x\n", hr);
hr = COMPAT_E_DEVICE_INVALIDATED(This->version);
goto exit;
}
if(This->version <= 20)
*ppMasteringVoice = (IXAudio2MasteringVoice*)&This->IXAudio20MasteringVoice_iface;