dmime: IDirectMusicPerformance::CreateAudioPath should fail when config is NULL.
This commit is contained in:
parent
289dfacfd4
commit
e9a52308bb
2 changed files with 5 additions and 1 deletions
|
@ -1654,7 +1654,7 @@ static HRESULT WINAPI performance_CreateAudioPath(IDirectMusicPerformance8 *ifac
|
|||
|
||||
FIXME("(%p, %p, %d, %p): stub\n", This, pSourceConfig, fActivate, ret_iface);
|
||||
|
||||
if (!ret_iface) return E_POINTER;
|
||||
if (!ret_iface || !pSourceConfig) return E_POINTER;
|
||||
if (!This->audio_paths_enabled) return DMUS_E_AUDIOPATH_INACTIVE;
|
||||
|
||||
create_dmaudiopath(&IID_IDirectMusicAudioPath, (void **)&pPath);
|
||||
|
|
|
@ -1256,6 +1256,7 @@ static void test_COM_performance(void)
|
|||
IDirectMusicPerformance *dmp = (IDirectMusicPerformance*)0xdeadbeef;
|
||||
IDirectMusicPerformance *dmp2;
|
||||
IDirectMusicPerformance8 *dmp8;
|
||||
IDirectMusicAudioPath *dmap = NULL;
|
||||
ULONG refcount;
|
||||
HRESULT hr;
|
||||
|
||||
|
@ -1284,6 +1285,9 @@ static void test_COM_performance(void)
|
|||
ok (refcount == 3, "refcount == %lu, expected 3\n", refcount);
|
||||
hr = IDirectMusicPerformance_QueryInterface(dmp, &IID_IDirectMusicPerformance8, (void**)&dmp8);
|
||||
ok(hr == S_OK, "QueryInterface for IID_IDirectMusicPerformance8 failed: %#lx\n", hr);
|
||||
hr = IDirectMusicPerformance8_CreateAudioPath(dmp8, NULL, TRUE, &dmap);
|
||||
ok(hr == E_POINTER, "Unexpected result from CreateAudioPath: %#lx\n", hr);
|
||||
ok(dmap == NULL, "Unexpected dmap pointer\n");
|
||||
refcount = IDirectMusicPerformance_Release(dmp);
|
||||
ok (refcount == 3, "refcount == %lu, expected 3\n", refcount);
|
||||
refcount = IDirectMusicPerformance8_Release(dmp8);
|
||||
|
|
Loading…
Add table
Reference in a new issue