Commit ed48ffdf authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

dmstyle: IsParamSupported method doesn't crashes on NULL.

parent b79f81ad
......@@ -144,6 +144,10 @@ static HRESULT WINAPI IDirectMusicAuditionTrack_IDirectMusicTrack_IsParamSupport
ICOM_THIS_MULTI(IDirectMusicAuditionTrack, TrackVtbl, iface);
TRACE("(%p, %s)\n", This, debugstr_dmguid(rguidType));
if (!rguidType)
return E_POINTER;
/* didn't find any params */
TRACE("param unsupported\n");
return DMUS_E_TYPE_UNSUPPORTED;
......
......@@ -145,6 +145,10 @@ static HRESULT WINAPI IDirectMusicChordTrack_IDirectMusicTrack_IsParamSupported
ICOM_THIS_MULTI(IDirectMusicChordTrack, TrackVtbl, iface);
TRACE("(%p, %s)\n", This, debugstr_dmguid(rguidType));
if (!rguidType)
return E_POINTER;
if (IsEqualGUID (rguidType, &GUID_BandParam)
|| IsEqualGUID (rguidType, &GUID_ChordParam)
|| IsEqualGUID (rguidType, &GUID_RhythmParam)) {
......
......@@ -145,6 +145,10 @@ static HRESULT WINAPI IDirectMusicCommandTrack_IDirectMusicTrack_IsParamSupporte
ICOM_THIS_MULTI(IDirectMusicCommandTrack, TrackVtbl, iface);
TRACE("(%p, %s)\n", This, debugstr_dmguid(rguidType));
if (!rguidType)
return E_POINTER;
if (IsEqualGUID (rguidType, &GUID_CommandParam)
|| IsEqualGUID (rguidType, &GUID_CommandParam2)
|| IsEqualGUID (rguidType, &GUID_CommandParamNext)) {
......
......@@ -144,6 +144,10 @@ static HRESULT WINAPI IDirectMusicMotifTrack_IDirectMusicTrack_IsParamSupported
ICOM_THIS_MULTI(IDirectMusicMotifTrack, TrackVtbl, iface);
TRACE("(%p, %s)\n", This, debugstr_dmguid(rguidType));
if (!rguidType)
return E_POINTER;
if (IsEqualGUID (rguidType, &GUID_DisableTimeSig)
|| IsEqualGUID (rguidType, &GUID_EnableTimeSig)
|| IsEqualGUID (rguidType, &GUID_SeedVariations)
......
......@@ -144,6 +144,10 @@ static HRESULT WINAPI IDirectMusicMuteTrack_IDirectMusicTrack_IsParamSupported (
ICOM_THIS_MULTI(IDirectMusicMuteTrack, TrackVtbl, iface);
TRACE("(%p, %s)\n", This, debugstr_dmguid(rguidType));
if (!rguidType)
return E_POINTER;
if (IsEqualGUID (rguidType, &GUID_MuteParam)) {
TRACE("param supported\n");
return S_OK;
......
......@@ -145,6 +145,10 @@ static HRESULT WINAPI IDirectMusicStyleTrack_IDirectMusicTrack_IsParamSupported
ICOM_THIS_MULTI(IDirectMusicStyleTrack, TrackVtbl, iface);
TRACE("(%p, %s)\n", This, debugstr_dmguid(rguidType));
if (!rguidType)
return E_POINTER;
if (IsEqualGUID (rguidType, &GUID_DisableTimeSig)
|| IsEqualGUID (rguidType, &GUID_EnableTimeSig)
|| IsEqualGUID (rguidType, &GUID_IDirectMusicStyle)
......
......@@ -273,6 +273,10 @@ static void test_track(void)
}
ok(hr == S_OK, "%s create failed: %08x, expected S_OK\n", class[i].name, hr);
/* IDirectMusicTrack8 */
hr = IDirectMusicTrack8_IsParamSupported(dmt8, NULL);
ok(hr == E_POINTER, "IDirectMusicTrack8_IsParamSupported failed: %08x\n", hr);
/* IPersistStream */
hr = IDirectMusicTrack8_QueryInterface(dmt8, &IID_IPersistStream, (void**)&ps);
ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr);
......
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