Fix a stupied bug in DdAttachSurface when pSurfaceFrom->hDDSurface is NULL or pSurfac...
authorMagnus Olsen <magnus@greatlord.com>
Tue, 25 Sep 2007 16:49:13 +0000 (16:49 +0000)
committerMagnus Olsen <magnus@greatlord.com>
Tue, 25 Sep 2007 16:49:13 +0000 (16:49 +0000)
svn path=/trunk/; revision=29202

reactos/dll/win32/gdi32/misc/gdientry.c

index 1e38d97..f692297 100644 (file)
@@ -942,7 +942,7 @@ DdAttachSurface( LPDDRAWI_DDRAWSURFACE_LCL pSurfaceFrom,
                  LPDDRAWI_DDRAWSURFACE_LCL pSurfaceTo)
 {
     /* Create Surface if it does not exits one */
                  LPDDRAWI_DDRAWSURFACE_LCL pSurfaceTo)
 {
     /* Create Surface if it does not exits one */
-    if (pSurfaceFrom->hDDSurface)
+    if (!pSurfaceFrom->hDDSurface)
     {
         if (!bDDCreateSurface(pSurfaceFrom, FALSE))
         {
     {
         if (!bDDCreateSurface(pSurfaceFrom, FALSE))
         {
@@ -951,7 +951,7 @@ DdAttachSurface( LPDDRAWI_DDRAWSURFACE_LCL pSurfaceFrom,
     }
 
     /* Create Surface if it does not exits one */
     }
 
     /* Create Surface if it does not exits one */
-    if (pSurfaceTo->hDDSurface)
+    if (!pSurfaceTo->hDDSurface)
     {
         if (!bDDCreateSurface(pSurfaceTo, FALSE))
         {
     {
         if (!bDDCreateSurface(pSurfaceTo, FALSE))
         {