bugfix a bsod in DD_Cleanup
authorMagnus Olsen <magnus@greatlord.com>
Sun, 11 Dec 2005 19:42:08 +0000 (19:42 +0000)
committerMagnus Olsen <magnus@greatlord.com>
Sun, 11 Dec 2005 19:42:08 +0000 (19:42 +0000)
svn path=/trunk/; revision=20078

reactos/subsys/win32k/ntddraw/ddraw.c

index d827744..3a4f6e1 100644 (file)
 
 BOOL INTERNAL_CALL
 DD_Cleanup(PVOID ObjectBody)
-{
-    if (ObjectBody == NULL)
-        return FALSE;
-        
+{       
        PDD_DIRECTDRAW pDirectDraw = (PDD_DIRECTDRAW) ObjectBody;
        DPRINT1("DD_Cleanup\n");
        
        if (!pDirectDraw)
                return FALSE;
-
+    
+    if (pDirectDraw->Global.dhpdev == NULL)
+        return FALSE;
+        
+    if (pDirectDraw->DrvDisableDirectDraw == NULL)
+        return FALSE;
+        
        pDirectDraw->DrvDisableDirectDraw(pDirectDraw->Global.dhpdev);
        return TRUE;
 }