From b2c1500c70050dd640918a031f1047f875851c63 Mon Sep 17 00:00:00 2001 From: Toni Spets Date: Mon, 8 Nov 2010 18:54:03 +0200 Subject: [PATCH] Do not free DirectDraw ever, avoids crashing issue on exit with Red Alert, real surface can be freed --- main.c | 2 +- surface.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index 106f575..a3836d7 100644 --- a/main.c +++ b/main.c @@ -379,7 +379,7 @@ ULONG __stdcall ddraw_Release(IDirectDrawImpl *This) if(This->Ref == 0) { - free(This); + //free(This); ddraw = NULL; return 0; } diff --git a/surface.c b/surface.c index d202f0a..9300a83 100644 --- a/surface.c +++ b/surface.c @@ -53,13 +53,12 @@ ULONG __stdcall ddraw_surface_Release(IDirectDrawSurfaceImpl *This) } if(This->surface) { - //free(This->surface); + free(This->surface); } if(This->palette) { IDirectDrawPalette_Release(This->palette); } - /* FIXME: crashing on 64bit windows, investigate! */ //free(This); return 0; }