wined3d: Check BO existence before trying to update its fence counter.

Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Matteo Bruni 2022-04-27 13:21:57 +02:00 committed by Alexandre Julliard
parent c99e6b33a3
commit d84fb82950
1 changed files with 2 additions and 1 deletions

View File

@ -6744,7 +6744,8 @@ static inline void wined3d_context_gl_reference_bo(struct wined3d_context_gl *co
static inline void wined3d_context_gl_reference_buffer(struct wined3d_context_gl *context_gl, static inline void wined3d_context_gl_reference_buffer(struct wined3d_context_gl *context_gl,
struct wined3d_buffer *buffer) struct wined3d_buffer *buffer)
{ {
wined3d_context_gl_reference_bo(context_gl, wined3d_bo_gl(buffer->buffer_object)); if (buffer->buffer_object)
wined3d_context_gl_reference_bo(context_gl, wined3d_bo_gl(buffer->buffer_object));
} }
static inline bool wined3d_map_persistent(void) static inline bool wined3d_map_persistent(void)