? ddraw.dll.dbg.c
? ddraw.spec.def
Index: ddraw_utils.c
===================================================================
RCS file: /home/wine/wine/dlls/ddraw/ddraw_utils.c,v
retrieving revision 1.1
diff -u -r1.1 ddraw_utils.c
--- ddraw_utils.c	31 May 2005 09:32:44 -0000	1.1
+++ ddraw_utils.c	6 Oct 2005 21:56:05 -0000
@@ -640,14 +640,17 @@
         };
 #undef STRUCT
 
-    if (lpddsd->dwSize >= sizeof(DDSURFACEDESC2)) {
-        DDRAW_dump_members(lpddsd->dwFlags, lpddsd, members_caps2, 1);
+    if (NULL == lpddsd) {
+        DPRINTF("(null)\n");
     } else {
-        DDRAW_dump_members(lpddsd->dwFlags, lpddsd, members_caps, 1);
+      if (lpddsd->dwSize >= sizeof(DDSURFACEDESC2)) {
+          DDRAW_dump_members(lpddsd->dwFlags, lpddsd, members_caps2, 1);
+      } else {
+          DDRAW_dump_members(lpddsd->dwFlags, lpddsd, members_caps, 1);
+      }
+      DDRAW_dump_members(lpddsd->dwFlags, lpddsd, members,
+			 sizeof(members)/sizeof(members[0]));
     }
-                                                  
-    DDRAW_dump_members(lpddsd->dwFlags, lpddsd, members,
-                       sizeof(members)/sizeof(members[0]));
 }
 
 void DDRAW_dump_cooperativelevel(DWORD cooplevel)
Index: surface_main.c
===================================================================
RCS file: /home/wine/wine/dlls/ddraw/surface_main.c,v
retrieving revision 1.5
diff -u -r1.5 surface_main.c
--- surface_main.c	12 Sep 2005 14:12:47 -0000	1.5
+++ surface_main.c	6 Oct 2005 21:56:05 -0000
@@ -1093,6 +1093,12 @@
 	    WARN(" - unsupported locking flag : "); DDRAW_dump_lockflag(flags & ~(DDLOCK_WAIT|DDLOCK_READONLY|DDLOCK_WRITEONLY));
 	}
     }
+    if (NULL != h) {
+        return DDERR_INVALIDPARAMS;
+    }
+    if (NULL == pDDSD) {
+        return DDERR_INVALIDPARAMS; /** really ? */
+    }
 
     /* If the surface is already locked, return busy */
     if (This->locked) {
