Stefan Dösinger : wined3d: Unset the ddraw primary when it is released.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue May 16 06:24:52 CDT 2006
Module: wine
Branch: refs/heads/master
Commit: f7d89201c13499e2e1b0c5fbf1fa2e356036e081
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=f7d89201c13499e2e1b0c5fbf1fa2e356036e081
Author: Stefan Dösinger <stefan at codeweavers.com>
Date: Mon May 15 20:49:36 2006 +0200
wined3d: Unset the ddraw primary when it is released.
---
dlls/wined3d/surface.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index d56777f..5b7198c 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -65,6 +65,7 @@ ULONG WINAPI IWineD3DSurfaceImpl_Release
ULONG ref = InterlockedDecrement(&This->resource.ref);
TRACE("(%p) : Releasing from %ld\n", This, ref + 1);
if (ref == 0) {
+ IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *) This->resource.wineD3DDevice;
TRACE("(%p) : cleaning up\n", This);
if (This->glDescription.textureName != 0) { /* release the openGL texture.. */
ENTER_GL();
@@ -84,6 +85,8 @@ ULONG WINAPI IWineD3DSurfaceImpl_Release
}
IWineD3DResourceImpl_CleanUp((IWineD3DResource *)iface);
+ if(iface == device->ddraw_primary)
+ device->ddraw_primary = NULL;
TRACE("(%p) Released\n", This);
HeapFree(GetProcessHeap(), 0, This);
More information about the wine-cvs
mailing list