Henri Verbeet : wined3d: Don't return the BO address offset if glMapBuffer() fails.
Alexandre Julliard
julliard at winehq.org
Wed Dec 1 15:23:49 CST 2021
Module: wine
Branch: master
Commit: 4ff480b2a2c838b968abf8e2d4f07e63988b8437
URL: https://source.winehq.org/git/wine.git/?a=commit;h=4ff480b2a2c838b968abf8e2d4f07e63988b8437
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Tue Nov 30 17:55:19 2021 -0600
wined3d: Don't return the BO address offset if glMapBuffer() fails.
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wined3d/context_gl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/context_gl.c b/dlls/wined3d/context_gl.c
index 0b0d594b4b1..675c26ac6fe 100644
--- a/dlls/wined3d/context_gl.c
+++ b/dlls/wined3d/context_gl.c
@@ -2716,8 +2716,8 @@ map:
}
else
{
- map_ptr = GL_EXTCALL(glMapBuffer(bo->binding, wined3d_resource_gl_legacy_map_flags(flags)));
- map_ptr += offset;
+ if ((map_ptr = GL_EXTCALL(glMapBuffer(bo->binding, wined3d_resource_gl_legacy_map_flags(flags)))))
+ map_ptr += offset;
}
wined3d_context_gl_bind_bo(context_gl, bo->binding, 0);
More information about the wine-cvs
mailing list