[PATCH 2/5] wined3d: Avoid calling wined3d_surface_set_mem() in surface_cleanup().
hverbeet at codeweavers.com
Mon Nov 18 03:46:17 CST 2013
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 e30d6b4..a5d9118 100644
@@ -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;
More information about the wine-patches