[ros-diffs] [greatlrd] 21529: Fixing a crash bug But ddraw can leak memmory now. But it is werid that u can not total release the whole dx COM for some program will crash then

aleksey at studiocerebral.com aleksey at studiocerebral.com
Sun Apr 9 16:12:43 CEST 2006


Author: greatlrd
Date: Sun Apr  9 18:12:42 2006
New Revision: 21529

URL: http://svn.reactos.ru/svn/reactos?rev=21529&view=rev
Log:
Fixing a crash bug But ddraw can leak memmory now. But it is werid that u can not total release the whole dx COM for some program will crash then 

Modified:
    trunk/reactos/dll/directx/ddraw/main/ddraw_main.c

Modified: trunk/reactos/dll/directx/ddraw/main/ddraw_main.c
URL: http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/directx/ddraw/main/ddraw_main.c?rev=21529&r1=21528&r2=21529&view=diff
==============================================================================
--- trunk/reactos/dll/directx/ddraw/main/ddraw_main.c (original)
+++ trunk/reactos/dll/directx/ddraw/main/ddraw_main.c Sun Apr  9 18:12:42 2006
@@ -152,13 +152,19 @@
 			{
 				ChangeDisplaySettings(NULL, 0);
 			}
+            
 
 			Hal_DirectDraw_Release(iface);
 			//Hel_DirectDraw_Release(iface);
+            
 			RtlZeroMemory(&This->mDDrawGlobal, sizeof(DDRAWI_DIRECTDRAW_GBL));
-			RtlZeroMemory(This, sizeof(IDirectDrawImpl));	
-
-			HeapFree(GetProcessHeap(), 0, This);
+			//RtlZeroMemory(This, sizeof(IDirectDrawImpl));	
+           
+            if (This!=NULL)
+            {
+              
+			  // HeapFree(GetProcessHeap(), 0, This);
+            }
 		}
     }
     return ref;





More information about the Ros-diffs mailing list