Author: dgorbachev
Date: Tue May 29 17:36:03 2007
New Revision: 26937
URL:
http://svn.reactos.org/svn/reactos?rev=26937&view=rev
Log:
Fix bug #2267.
Modified:
trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_main.c
Modified: trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/Ddraw/dd…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_main.c (original)
+++ trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_main.c Tue May 29 17:36:03 2007
@@ -207,15 +207,20 @@
// EnterCriticalSection(&ddcs);
_SEH_TRY
{
- if (pDDSD->dwSize != sizeof(DDSURFACEDESC))
- {
- return DDERR_INVALIDPARAMS;
- }
-
- CopyDDSurfDescToDDSurfDesc2(&dd_desc_v2, (LPDDSURFACEDESC)pDDSD);
- ret = Internal_CreateSurface( (LPDDRAWI_DIRECTDRAW_INT)iface,&dd_desc_v2,
(LPDIRECTDRAWSURFACE7 *)ppSurf,pUnkOuter);
- }
- _SEH_HANDLE
+ if (pDDSD->dwSize == sizeof(DDSURFACEDESC))
+ {
+ CopyDDSurfDescToDDSurfDesc2(&dd_desc_v2, (LPDDSURFACEDESC)pDDSD);
+ ret = Internal_CreateSurface((LPDDRAWI_DIRECTDRAW_INT)iface,
+ &dd_desc_v2,
+ (LPDIRECTDRAWSURFACE7 *)ppSurf,
+ pUnkOuter);
+ }
+ else
+ {
+ ret = DDERR_INVALIDPARAMS;
+ }
+ }
+ _SEH_HANDLE
{
ret = DDERR_GENERIC;
}
@@ -236,7 +241,7 @@
_SEH_TRY
{
ret = Internal_CreateSurface( (LPDDRAWI_DIRECTDRAW_INT)iface,pDDSD,
ppSurf,pUnkOuter);
- }
+ }
_SEH_HANDLE
{
ret = DDERR_GENERIC;