mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d: Handle the case where a descriptor is null and is concurrently written non-null.
If view is null and the comparison (view == src->s.u.object) is false, vkd3d_view_decref will be called on null.
This commit is contained in:
parent
819c5f1943
commit
3d49b59a68
Notes:
Alexandre Julliard
2023-07-27 21:41:09 +09:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/285
@ -882,8 +882,9 @@ static inline void *d3d12_desc_get_object_ref(const volatile struct d3d12_desc *
|
||||
{
|
||||
do
|
||||
{
|
||||
view = src->s.u.object;
|
||||
} while (view && !vkd3d_view_incref(view));
|
||||
if (!(view = src->s.u.object))
|
||||
return NULL;
|
||||
} while (!vkd3d_view_incref(view));
|
||||
|
||||
/* Check if the object is still in src to handle the case where it was
|
||||
* already freed and reused elsewhere when the refcount was incremented. */
|
||||
|
Loading…
Reference in New Issue
Block a user