Module: wine Branch: master Commit: 8f1122f8d2be5f6a383f2e73d88b9e41a735689f URL: https://source.winehq.org/git/wine.git/?a=commit;h=8f1122f8d2be5f6a383f2e73d... Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri Feb 5 09:11:01 2021 +0100 windowscodecs: Return E_INVALIDARG from GetFrame with NULL pointer. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Esme Povirk <esme(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windowscodecs/decoder.c | 2 +- dlls/windowscodecs/tests/wmpformat.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/windowscodecs/decoder.c b/dlls/windowscodecs/decoder.c index b0fcd34c742..89e352b8946 100644 --- a/dlls/windowscodecs/decoder.c +++ b/dlls/windowscodecs/decoder.c @@ -724,7 +724,7 @@ static HRESULT WINAPI CommonDecoder_GetFrame(IWICBitmapDecoder *iface, TRACE("(%p,%u,%p)\n", iface, index, ppIBitmapFrame); if (!ppIBitmapFrame) - return E_POINTER; + return E_INVALIDARG; EnterCriticalSection(&This->lock); diff --git a/dlls/windowscodecs/tests/wmpformat.c b/dlls/windowscodecs/tests/wmpformat.c index c4f947d8acf..c1a320b6ec0 100644 --- a/dlls/windowscodecs/tests/wmpformat.c +++ b/dlls/windowscodecs/tests/wmpformat.c @@ -123,7 +123,7 @@ static void test_decode(void) ok(count == 1, "unexpected count %u\n", count); hr = IWICBitmapDecoder_GetFrame(decoder, 0, NULL); - todo_wine ok(hr == E_INVALIDARG, "GetFrame(NULL) returned hr=%x\n", hr); + ok(hr == E_INVALIDARG, "GetFrame(NULL) returned hr=%x\n", hr); for (j = 2; j > 0; --j) {