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