Signed-off-by: Sven Baars sven.wine@gmail.com --- dlls/mfplat/main.c | 12 ++++++++++++ dlls/mfplat/tests/mfplat.c | 14 ++++++++++++++ 2 files changed, 26 insertions(+)
diff --git a/dlls/mfplat/main.c b/dlls/mfplat/main.c index 46a697538c..b84f93ad2d 100644 --- a/dlls/mfplat/main.c +++ b/dlls/mfplat/main.c @@ -2094,6 +2094,9 @@ static HRESULT WINAPI mfmediaevent_GetType(IMFMediaEvent *iface, MediaEventType
TRACE("%p, %p\n", This, type);
+ if (!type) + return E_INVALIDARG; + *type = This->type;
return S_OK; @@ -2105,6 +2108,9 @@ static HRESULT WINAPI mfmediaevent_GetExtendedType(IMFMediaEvent *iface, GUID *e
TRACE("%p, %p\n", This, extended_type);
+ if (!extended_type) + return E_INVALIDARG; + *extended_type = This->extended_type;
return S_OK; @@ -2116,6 +2122,9 @@ static HRESULT WINAPI mfmediaevent_GetStatus(IMFMediaEvent *iface, HRESULT *stat
TRACE("%p, %p\n", This, status);
+ if (!status) + return E_INVALIDARG; + *status = This->status;
return S_OK; @@ -2125,6 +2134,9 @@ static HRESULT WINAPI mfmediaevent_GetValue(IMFMediaEvent *iface, PROPVARIANT *v { mfmediaevent *This = impl_from_IMFMediaEvent(iface);
+ if (!value) + return E_INVALIDARG; + PropVariantCopy(value, &This->value);
return S_OK; diff --git a/dlls/mfplat/tests/mfplat.c b/dlls/mfplat/tests/mfplat.c index 48a8d0d361..8b6dd4523f 100644 --- a/dlls/mfplat/tests/mfplat.c +++ b/dlls/mfplat/tests/mfplat.c @@ -278,6 +278,20 @@ static void test_MFCreateMediaEvent(void) hr = MFCreateMediaEvent(MEError, &GUID_NULL, E_FAIL, &value, &mediaevent); ok(hr == S_OK, "got 0x%08x\n", hr);
+ hr = IMFMediaEvent_GetType(mediaevent, NULL); + ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + + hr = IMFMediaEvent_GetExtendedType(mediaevent, NULL); + ok(hr == E_INVALIDARG || + /* wvistau64 */ + broken(hr == S_OK), "got 0x%08x\n", hr); + + hr = IMFMediaEvent_GetStatus(mediaevent, NULL); + ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + + hr = IMFMediaEvent_GetValue(mediaevent, NULL); + ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + PropVariantClear(&value);
hr = IMFMediaEvent_GetType(mediaevent, &type);