Commit 1593f146 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

windowscodecs: IWICMetadataQueryReader::GetMetadataByName() should accept NULL for returned value.

parent 2d5d3a89
......@@ -589,7 +589,7 @@ static HRESULT WINAPI mqr_GetMetadataByName(IWICMetadataQueryReader *iface, LPCW
PropVariantClear(&tk_id);
PropVariantClear(&tk_schema);
if (hr == S_OK)
if (hr == S_OK && value)
*value = new_value;
else
PropVariantClear(&new_value);
......
......@@ -1606,6 +1606,10 @@ static void test_metadata_gif(void)
if (winetest_debug > 1)
trace("query: %s\n", decoder_data[i].query);
MultiByteToWideChar(CP_ACP, 0, decoder_data[i].query, -1, queryW, 256);
hr = IWICMetadataQueryReader_GetMetadataByName(queryreader, queryW, NULL);
ok(hr == decoder_data[i].hr, "GetMetadataByName(%s) returned %#x, expected %#x\n", wine_dbgstr_w(queryW), hr, decoder_data[i].hr);
PropVariantInit(&value);
hr = IWICMetadataQueryReader_GetMetadataByName(queryreader, queryW, &value);
ok(hr == decoder_data[i].hr, "GetMetadataByName(%s) returned %#x, expected %#x\n", wine_dbgstr_w(queryW), hr, decoder_data[i].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