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
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)) {
......
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