wmp: Return E_POINTER when p is NULL in return_bstr.

Signed-off-by: Gijs Vermeulen <gijsvrm@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
stable
Gijs Vermeulen 2019-08-01 15:07:56 +02:00 committed by Alexandre Julliard
parent 3b0e819761
commit bf3d719d08
2 changed files with 1 additions and 2 deletions

View File

@ -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);

View File

@ -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);