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.
This commit is contained in:
Henri Verbeet 2013-11-18 10:46:17 +01:00 committed by Alexandre Julliard
parent 505951e32d
commit 941fe99eaf
1 changed files with 2 additions and 1 deletions

View File

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