Commit fcae0167 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

dmime: Do not try to query a NULL direct sound buffer.

parent 4f26fb0e
...@@ -108,21 +108,22 @@ static HRESULT WINAPI IDirectMusicAudioPathImpl_IDirectMusicAudioPath_GetObjectI ...@@ -108,21 +108,22 @@ static HRESULT WINAPI IDirectMusicAudioPathImpl_IDirectMusicAudioPath_GetObjectI
FIXME("(%p, %d, %d, %d, %s, %d, %s, %p): stub\n", This, dwPChannel, dwStage, dwBuffer, debugstr_dmguid(guidObject), dwIndex, debugstr_dmguid(iidInterface), ppObject); FIXME("(%p, %d, %d, %d, %s, %d, %s, %p): stub\n", This, dwPChannel, dwStage, dwBuffer, debugstr_dmguid(guidObject), dwIndex, debugstr_dmguid(iidInterface), ppObject);
switch (dwStage) { switch (dwStage) {
case DMUS_PATH_BUFFER: case DMUS_PATH_BUFFER:
{ if (This->pDSBuffer)
if (IsEqualIID (iidInterface, &IID_IDirectSoundBuffer8)) { {
IDirectSoundBuffer8_QueryInterface (This->pDSBuffer, &IID_IDirectSoundBuffer8, ppObject); if (IsEqualIID (iidInterface, &IID_IDirectSoundBuffer8)) {
TRACE("returning %p\n",*ppObject); IDirectSoundBuffer8_QueryInterface (This->pDSBuffer, &IID_IDirectSoundBuffer8, ppObject);
return S_OK; TRACE("returning %p\n",*ppObject);
} else if (IsEqualIID (iidInterface, &IID_IDirectSound3DBuffer)) { return S_OK;
IDirectSoundBuffer8_QueryInterface (This->pDSBuffer, &IID_IDirectSound3DBuffer, ppObject); } else if (IsEqualIID (iidInterface, &IID_IDirectSound3DBuffer)) {
TRACE("returning %p\n",*ppObject); IDirectSoundBuffer8_QueryInterface (This->pDSBuffer, &IID_IDirectSound3DBuffer, ppObject);
return S_OK; TRACE("returning %p\n",*ppObject);
} else { return S_OK;
FIXME("Bad iid\n"); } else {
} FIXME("Bad iid\n");
} }
break; }
break;
case DMUS_PATH_PRIMARY_BUFFER: { case DMUS_PATH_PRIMARY_BUFFER: {
if (IsEqualIID (iidInterface, &IID_IDirectSound3DListener)) { if (IsEqualIID (iidInterface, &IID_IDirectSound3DListener)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment