Henri Verbeet : wined3d: Don't return the BO address offset if glMapBuffer() fails.
Module: wine Branch: master Commit: 4ff480b2a2c838b968abf8e2d4f07e63988b8437 URL: https://source.winehq.org/git/wine.git/?a=commit;h=4ff480b2a2c838b968abf8e2d... Author: Henri Verbeet <hverbeet(a)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(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)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);
participants (1)
-
Alexandre Julliard