Author: mjansen
Date: Sat Aug 19 09:51:17 2017
New Revision: 75621
URL:
http://svn.reactos.org/svn/reactos?rev=75621&view=rev
Log:
[WINED3D] Dereference context slightly later, as seen in wine. This prevents some crashes
while applications are starting up. (f.e. ANNO1602)
Modified:
trunk/reactos/dll/directx/wine/wined3d/context.c
Modified: trunk/reactos/dll/directx/wine/wined3d/context.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/wined3d/c…
==============================================================================
--- trunk/reactos/dll/directx/wine/wined3d/context.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/wined3d/context.c [iso-8859-1] Sat Aug 19 09:51:17
2017
@@ -2714,12 +2714,14 @@
void *context_map_bo_address(struct wined3d_context *context,
const struct wined3d_bo_address *data, size_t size, GLenum binding, DWORD flags)
{
- const struct wined3d_gl_info *gl_info = context->gl_info;
+ const struct wined3d_gl_info *gl_info;
BYTE *memory;
if (!data->buffer_object)
return data->addr;
+ gl_info = context->gl_info;
+
context_bind_bo(context, binding, data->buffer_object);
if (gl_info->supported[ARB_MAP_BUFFER_RANGE])
@@ -2742,10 +2744,12 @@
void context_unmap_bo_address(struct wined3d_context *context,
const struct wined3d_bo_address *data, GLenum binding)
{
- const struct wined3d_gl_info *gl_info = context->gl_info;
+ const struct wined3d_gl_info *gl_info;
if (!data->buffer_object)
return;
+
+ gl_info = context->gl_info;
context_bind_bo(context, binding, data->buffer_object);
GL_EXTCALL(glUnmapBuffer(binding));