mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-09-13 09:16:14 -07:00
vkd3d-shader: Return NULL from vkd3d_shader_message_context_copy_messages() if there are no messages to copy.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
0072fb213a
commit
05cf9a5404
@ -149,6 +149,9 @@ bool vkd3d_shader_message_context_copy_messages(struct vkd3d_shader_message_cont
|
||||
|
||||
*out = NULL;
|
||||
|
||||
if (!context->messages.content_size)
|
||||
return true;
|
||||
|
||||
if (!(messages = vkd3d_malloc(context->messages.content_size + 1)))
|
||||
return false;
|
||||
memcpy(messages, context->messages.buffer, context->messages.content_size + 1);
|
||||
|
@ -335,6 +335,8 @@ START_TEST(shader_runner_d3d12)
|
||||
ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
|
||||
ok(!blob, "Expected no compiled shader blob.\n");
|
||||
ok(!!errors, "Expected non-NULL error blob.\n");
|
||||
if (!errors)
|
||||
return;
|
||||
|
||||
if (vkd3d_test_state.debug_level)
|
||||
trace("%s\n", (char *)ID3D10Blob_GetBufferPointer(errors));
|
||||
|
Loading…
Reference in New Issue
Block a user