wined3d: Cleanup the staging bo on an error path in wined3d_texture_vk_upload_data().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2021-01-18 15:38:47 +01:00 committed by Alexandre Julliard
parent 0d2b730f9e
commit d54576c89b
1 changed files with 1 additions and 0 deletions

View File

@ -4678,6 +4678,7 @@ static void wined3d_texture_vk_upload_data(struct wined3d_context *context,
if (!(vk_command_buffer = wined3d_context_vk_get_command_buffer(context_vk))) if (!(vk_command_buffer = wined3d_context_vk_get_command_buffer(context_vk)))
{ {
ERR("Failed to get command buffer.\n"); ERR("Failed to get command buffer.\n");
wined3d_context_vk_destroy_bo(context_vk, &staging_bo);
return; return;
} }