vkd3d: Prevent a null pointer dereference when a descriptor is not a UAV.

Fixes crashes in Shadow of the Tomb Raider, GRID 2019 and probably others.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Conor McCarthy 2022-04-23 16:42:48 +10:00 committed by Alexandre Julliard
parent cab16fe903
commit 6b893b597b

View File

@ -3653,7 +3653,7 @@ static void d3d12_desc_buffered_copy_atomic(struct d3d12_desc *dst, const struct
vkd3d_mutex_unlock(mutex);
infos[set].uav_counter |= (location->src.magic == VKD3D_DESCRIPTOR_MAGIC_UAV)
& !!location->src.u.view_info.view->vk_counter_view;
&& !!location->src.u.view_info.view->vk_counter_view;
location->dst = dst;
if (infos[set].count == ARRAY_SIZE(locations[0]))