summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSND\ckain_cp <SND\ckain_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-05-17 14:39:38 +0000
committerSND\ckain_cp <SND\ckain_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-05-17 14:39:38 +0000
commit6085634d2dad25a9c2fa13d7bfb1be25376e26d3 (patch)
tree01a9fa5d481ef62164e2acd48ccf27e132089225
parent45a617930227f18bb1b50bbb7ab5f5a736b724bb (diff)
downloadpcsxr-6085634d2dad25a9c2fa13d7bfb1be25376e26d3.tar.gz
Win32: fix crash if direct sound initialization fails.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@84776 e17a0e51-4ae3-4d35-97c3-1a29b211df97
-rwxr-xr-xwin32/plugins/dfsound/winsrc/dsound.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/win32/plugins/dfsound/winsrc/dsound.c b/win32/plugins/dfsound/winsrc/dsound.c
index 94a606f3..707bafcf 100755
--- a/win32/plugins/dfsound/winsrc/dsound.c
+++ b/win32/plugins/dfsound/winsrc/dsound.c
@@ -211,6 +211,9 @@ void SoundFeedStreamData(unsigned char* pSound,long lBytes)
HRESULT hr;
unsigned long status;
+ if (lpDSB == NULL)
+ return;
+
if(iDoRecord) RecordBuffer(pSound,lBytes);
IDirectSoundBuffer_GetStatus(lpDSB,&status);