Take care of one BSOD in NtGdiDdCreateDirectDrawObject, it is not correct fix, it...
authorMagnus Olsen <magnus@greatlord.com>
Fri, 9 Dec 2005 20:40:52 +0000 (20:40 +0000)
committerMagnus Olsen <magnus@greatlord.com>
Fri, 9 Dec 2005 20:40:52 +0000 (20:40 +0000)
svn path=/trunk/; revision=20017

reactos/subsys/win32k/ntddraw/ddraw.c

index d7afe13..4077b57 100644 (file)
@@ -48,7 +48,13 @@ HANDLE STDCALL NtGdiDdCreateDirectDrawObject(
        RtlZeroMemory(&palette_callbacks, sizeof(DD_PALETTECALLBACKS));
        palette_callbacks.dwSize = sizeof(DD_PALETTECALLBACKS);
 
        RtlZeroMemory(&palette_callbacks, sizeof(DD_PALETTECALLBACKS));
        palette_callbacks.dwSize = sizeof(DD_PALETTECALLBACKS);
 
-       
+       /* FIXME hdc can be zero for d3d9 */
+    /* we need create it, if in that case */
+       if (hdc == NULL)
+       {
+           return NULL;
+    }
+    
        DC *pDC = DC_LockDc(hdc);
        if (!pDC)
                return NULL;
        DC *pDC = DC_LockDc(hdc);
        if (!pDC)
                return NULL;