From bf3d719d08c38e1c9e215f37ac03fe53b88380b9 Mon Sep 17 00:00:00 2001 From: Gijs Vermeulen Date: Thu, 1 Aug 2019 15:07:56 +0200 Subject: [PATCH] wmp: Return E_POINTER when p is NULL in return_bstr. Signed-off-by: Gijs Vermeulen Signed-off-by: Alexandre Julliard --- dlls/wmp/tests/media.c | 1 - dlls/wmp/wmp_private.h | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/wmp/tests/media.c b/dlls/wmp/tests/media.c index 3d750e13b20..7e76aee7446 100644 --- a/dlls/wmp/tests/media.c +++ b/dlls/wmp/tests/media.c @@ -535,7 +535,6 @@ static void test_media_item(void) hr = IWMPPlayer4_newMedia(player, NULL, &media); ok(hr == S_OK, "Failed to create a media item, hr %#x.\n", hr); hr = IWMPMedia_get_name(media, NULL); -todo_wine ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); hr = IWMPMedia_get_name(media, &str); ok(hr == S_OK, "Failed to get item name, hr %#x.\n", hr); diff --git a/dlls/wmp/wmp_private.h b/dlls/wmp/wmp_private.h index 5149d73942c..0b1b02305fb 100644 --- a/dlls/wmp/wmp_private.h +++ b/dlls/wmp/wmp_private.h @@ -135,7 +135,7 @@ static inline WCHAR *heap_strdupW(const WCHAR *str) static inline HRESULT return_bstr(const WCHAR *value, BSTR *p) { if(!p) - return E_INVALIDARG; + return E_POINTER; if(value) { *p = SysAllocString(value);