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

Conor McCarthy cmccarthy at codeweavers.com
Sat Apr 23 01:42:48 CDT 2022


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

Signed-off-by: Conor McCarthy <cmccarthy at codeweavers.com>
---
 libs/vkd3d/device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c
index 0b643727..1522065f 100644
--- a/libs/vkd3d/device.c
+++ b/libs/vkd3d/device.c
@@ -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]))
-- 
2.35.1




More information about the wine-devel mailing list