mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -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:
committed by
Alexandre Julliard
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);
|
||||
|
Reference in New Issue
Block a user