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

Alexandre Julliard julliard at winehq.org
Wed Apr 27 16:12:14 CDT 2022


Module: wine
Branch: master
Commit: d84fb82950dad32c6fda3266543a25be43a9f19e
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=d84fb82950dad32c6fda3266543a25be43a9f19e

Author: Matteo Bruni <mbruni at codeweavers.com>
Date:   Wed Apr 27 13:21:57 2022 +0200

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

Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wined3d/wined3d_private.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 11da88aff8a..3a12f5ef261 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -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,
         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)




More information about the wine-cvs mailing list