From: Magnus Olsen Date: Tue, 25 Sep 2007 16:49:13 +0000 (+0000) Subject: Fix a stupied bug in DdAttachSurface when pSurfaceFrom->hDDSurface is NULL or pSurfac... X-Git-Tag: backups/win32k-stable@33466~216 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=588e62a967f8df74032c54578904e8d722ff4e1a Fix a stupied bug in DdAttachSurface when pSurfaceFrom->hDDSurface is NULL or pSurfaceTo->hDDSurface is null we need create them. svn path=/trunk/; revision=29202 --- diff --git a/reactos/dll/win32/gdi32/misc/gdientry.c b/reactos/dll/win32/gdi32/misc/gdientry.c index 1e38d974cf4..f692297c166 100644 --- a/reactos/dll/win32/gdi32/misc/gdientry.c +++ b/reactos/dll/win32/gdi32/misc/gdientry.c @@ -942,7 +942,7 @@ DdAttachSurface( LPDDRAWI_DDRAWSURFACE_LCL pSurfaceFrom, LPDDRAWI_DDRAWSURFACE_LCL pSurfaceTo) { /* Create Surface if it does not exits one */ - if (pSurfaceFrom->hDDSurface) + if (!pSurfaceFrom->hDDSurface) { if (!bDDCreateSurface(pSurfaceFrom, FALSE)) { @@ -951,7 +951,7 @@ DdAttachSurface( LPDDRAWI_DDRAWSURFACE_LCL pSurfaceFrom, } /* Create Surface if it does not exits one */ - if (pSurfaceTo->hDDSurface) + if (!pSurfaceTo->hDDSurface) { if (!bDDCreateSurface(pSurfaceTo, FALSE)) {