mirror of
https://github.com/reactos/wine.git
synced 2024-11-26 05:00:30 +00:00
ddraw: Release the wined3d surface first in ddraw_surface_destroy().
This commit is contained in:
parent
25c0941e50
commit
cbf78c5d49
@ -244,6 +244,9 @@ void ddraw_surface_destroy(IDirectDrawSurfaceImpl *This)
|
||||
WARN("(%p): Destroying surface with refount %d\n", This, This->ref);
|
||||
}
|
||||
|
||||
if (This->WineD3DSurface)
|
||||
IWineD3DSurface_Release(This->WineD3DSurface);
|
||||
|
||||
/* Check for attached surfaces and detach them */
|
||||
if(This->first_attached != This)
|
||||
{
|
||||
@ -276,10 +279,6 @@ void ddraw_surface_destroy(IDirectDrawSurfaceImpl *This)
|
||||
}
|
||||
}
|
||||
|
||||
/* Now destroy the surface. Wait: It could have been released if we are a texture */
|
||||
if(This->WineD3DSurface)
|
||||
IWineD3DSurface_Release(This->WineD3DSurface);
|
||||
|
||||
/* Having a texture handle set implies that the device still exists */
|
||||
if(This->Handle)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user