From 941fe99eaf66bd2446a9c8434da6dad1765e4335 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Mon, 18 Nov 2013 10:46:17 +0100 Subject: [PATCH] wined3d: Avoid calling wined3d_surface_set_mem() in surface_cleanup(). Calling wined3d_surface_set_mem() might cause the surface container to be accessed, for example when invalidating resource locations. This would become a problem once we assume surfaces always have a container, and is pointless anyway because the surface is being destroyed. --- dlls/wined3d/surface.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index e30d6b41249..a5d91184d15 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -96,7 +96,8 @@ static void surface_cleanup(struct wined3d_surface *surface) } if (surface->flags & SFLAG_USERPTR) - wined3d_surface_set_mem(surface, NULL, 0); + surface->resource.allocatedMemory = NULL; + if (surface->overlay_dest) list_remove(&surface->overlay_entry);