wined3d: Don't return the BO address offset if glMapBuffer() fails.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2021-11-30 17:55:19 -06:00 committed by Alexandre Julliard
parent 669360152e
commit 4ff480b2a2
1 changed files with 2 additions and 2 deletions

View File

@ -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);