From 35eebeef0fe0b3f03f44731f805c447b2342acfd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Hentschel?= Date: Tue, 22 Dec 2015 19:34:57 +0100 Subject: [PATCH] xaudio2_7: Check return of IAudioClient_Start (Coverity). MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: André Hentschel Signed-off-by: Andrew Eikum Signed-off-by: Alexandre Julliard --- dlls/xaudio2_7/xaudio_dll.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dlls/xaudio2_7/xaudio_dll.c b/dlls/xaudio2_7/xaudio_dll.c index 04f975cbba5..e7176b29177 100644 --- a/dlls/xaudio2_7/xaudio_dll.c +++ b/dlls/xaudio2_7/xaudio_dll.c @@ -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; -- 2.11.4.GIT