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

This commit is contained in:
Aric Stewart 2014-02-26 18:03:35 +09:00 committed by Alexandre Julliard
parent 4f26fb0e0b
commit fcae01672f
1 changed files with 16 additions and 15 deletions

View File

@ -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);
switch (dwStage) {
case DMUS_PATH_BUFFER:
{
if (IsEqualIID (iidInterface, &IID_IDirectSoundBuffer8)) {
IDirectSoundBuffer8_QueryInterface (This->pDSBuffer, &IID_IDirectSoundBuffer8, ppObject);
TRACE("returning %p\n",*ppObject);
return S_OK;
} else if (IsEqualIID (iidInterface, &IID_IDirectSound3DBuffer)) {
IDirectSoundBuffer8_QueryInterface (This->pDSBuffer, &IID_IDirectSound3DBuffer, ppObject);
TRACE("returning %p\n",*ppObject);
return S_OK;
} else {
FIXME("Bad iid\n");
}
}
break;
case DMUS_PATH_BUFFER:
if (This->pDSBuffer)
{
if (IsEqualIID (iidInterface, &IID_IDirectSoundBuffer8)) {
IDirectSoundBuffer8_QueryInterface (This->pDSBuffer, &IID_IDirectSoundBuffer8, ppObject);
TRACE("returning %p\n",*ppObject);
return S_OK;
} else if (IsEqualIID (iidInterface, &IID_IDirectSound3DBuffer)) {
IDirectSoundBuffer8_QueryInterface (This->pDSBuffer, &IID_IDirectSound3DBuffer, ppObject);
TRACE("returning %p\n",*ppObject);
return S_OK;
} else {
FIXME("Bad iid\n");
}
}
break;
case DMUS_PATH_PRIMARY_BUFFER: {
if (IsEqualIID (iidInterface, &IID_IDirectSound3DListener)) {