[DSOUND] Check arguments in IDirectSoundFullDuplex::Initialize.

This prevents a crash in winetest_dsound:duplex
This commit is contained in:
Mark Jansen 2018-03-18 15:56:59 +01:00
parent 2d9c88e0c5
commit 775e2aea3c
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B

View file

@ -535,6 +535,9 @@ IDirectSoundFullDuplexImpl_Initialize(
lpDscBufferDesc, lpDsBufferDesc, hWnd, dwLevel, lpDscBufferDesc, lpDsBufferDesc, hWnd, dwLevel,
lplpDirectSoundCaptureBuffer8, lplpDirectSoundBuffer8); lplpDirectSoundCaptureBuffer8, lplpDirectSoundBuffer8);
if (!lplpDirectSoundCaptureBuffer8 || !lplpDirectSoundBuffer8)
return E_INVALIDARG;
if (This->renderer_device != NULL || This->capture_device != NULL) { if (This->renderer_device != NULL || This->capture_device != NULL) {
WARN("already initialized\n"); WARN("already initialized\n");
*lplpDirectSoundCaptureBuffer8 = NULL; *lplpDirectSoundCaptureBuffer8 = NULL;