Robert Reif : dsound: Fix duplex create bug.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Feb 28 06:08:28 CST 2006
Module: wine
Branch: refs/heads/master
Commit: 919ee6b699815f9d105184462643222a7bb67221
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=919ee6b699815f9d105184462643222a7bb67221
Author: Robert Reif <reif at earthlink.net>
Date: Mon Feb 27 07:34:01 2006 -0500
dsound: Fix duplex create bug.
---
dlls/dsound/duplex.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/dlls/dsound/duplex.c b/dlls/dsound/duplex.c
index 7ba0eb6..3a10bab 100644
--- a/dlls/dsound/duplex.c
+++ b/dlls/dsound/duplex.c
@@ -258,6 +258,12 @@ HRESULT IDirectSoundFullDuplex_IDirectSo
return DSERR_INVALIDPARAM;
}
+ if (((IDirectSoundFullDuplexImpl*)pdsfd)->renderer_device == NULL) {
+ WARN("not initialized\n");
+ *ppds = NULL;
+ return DSERR_UNINITIALIZED;
+ }
+
pdsfdds = HeapAlloc(GetProcessHeap(),0,sizeof(*pdsfdds));
if (pdsfdds == NULL) {
WARN("out of memory\n");
@@ -417,6 +423,12 @@ HRESULT IDirectSoundFullDuplex_IDirectSo
return DSERR_INVALIDPARAM;
}
+ if (((IDirectSoundFullDuplexImpl*)pdsfd)->renderer_device == NULL) {
+ WARN("not initialized\n");
+ *ppds8 = NULL;
+ return DSERR_UNINITIALIZED;
+ }
+
pdsfdds8 = HeapAlloc(GetProcessHeap(),0,sizeof(*pdsfdds8));
if (pdsfdds8 == NULL) {
WARN("out of memory\n");
@@ -525,6 +537,12 @@ HRESULT IDirectSoundFullDuplex_IDirectSo
return DSERR_INVALIDPARAM;
}
+ if (((IDirectSoundFullDuplexImpl*)pdsfd)->capture_device == NULL) {
+ WARN("not initialized\n");
+ *ppdsc8 = NULL;
+ return DSERR_UNINITIALIZED;
+ }
+
pdsfddsc = HeapAlloc(GetProcessHeap(),0,sizeof(*pdsfddsc));
if (pdsfddsc == NULL) {
WARN("out of memory\n");
@@ -774,6 +792,8 @@ HRESULT DSOUND_FullDuplexCreate(LPDIRECT
This->capture_device = NULL;
This->renderer_device = NULL;
+ *ppDSFD = (LPDIRECTSOUNDFULLDUPLEX)This;
+
return DS_OK;
}
More information about the wine-cvs
mailing list