Commit 472d802a authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

d3dcompiler: Always initialize output shader blob pointer in D3DCompile2().

parent f50a2631
......@@ -462,6 +462,8 @@ HRESULT WINAPI D3DCompile2(const void *data, SIZE_T data_size, const char *filen
if (secondary_flags)
FIXME("Ignoring secondary flags %#x.\n", secondary_flags);
if (shader_blob)
*shader_blob = NULL;
if (messages_blob)
*messages_blob = NULL;
......
......@@ -1412,7 +1412,8 @@ static void test_fail(void)
{
for (i = 0; i < ARRAY_SIZE(tests); ++i)
{
compiled = errors = NULL;
errors = NULL;
compiled = (void *)0xdeadbeef;
hr = D3DCompile(tests[i], strlen(tests[i]), NULL, NULL, NULL, "test", targets[j], 0, 0, &compiled, &errors);
ok(hr == E_FAIL, "Test %u, target %s: Got unexpected hr %#lx.\n", i, targets[j], hr);
ok(!!errors, "Test %u, target %s, expected non-NULL error blob.\n", i, targets[j]);
......
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