mirror of
https://github.com/reactos/reactos.git
synced 2025-05-21 18:16:07 +00:00
[DSOUND] Check arguments in IDirectSoundFullDuplex::Initialize.
This prevents a crash in winetest_dsound:duplex
This commit is contained in:
parent
2d9c88e0c5
commit
775e2aea3c
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue