mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-01 19:38:31 +00:00
d3dcompiler: Always initialize output shader blob pointer in D3DCompile2().
This commit is contained in:
parent
f50a263162
commit
472d802a24
|
@ -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]);
|
||||
|
|
Loading…
Reference in a new issue