mirror of
https://github.com/reactos/reactos.git
synced 2026-05-31 16:31:07 +08:00
[DSOUND] Check arguments in IDirectSoundFullDuplex::Initialize.
This prevents a crash in winetest_dsound:duplex
This commit is contained in:
@@ -535,6 +535,9 @@ IDirectSoundFullDuplexImpl_Initialize(
|
||||
lpDscBufferDesc, lpDsBufferDesc, hWnd, dwLevel,
|
||||
lplpDirectSoundCaptureBuffer8, lplpDirectSoundBuffer8);
|
||||
|
||||
if (!lplpDirectSoundCaptureBuffer8 || !lplpDirectSoundBuffer8)
|
||||
return E_INVALIDARG;
|
||||
|
||||
if (This->renderer_device != NULL || This->capture_device != NULL) {
|
||||
WARN("already initialized\n");
|
||||
*lplpDirectSoundCaptureBuffer8 = NULL;
|
||||
|
||||
Reference in New Issue
Block a user