Only set the pattern function pointer if the pattern surface is valid, spotted by...
authorGregor Schneider <grschneider@gmail.com>
Sun, 16 Aug 2009 18:52:06 +0000 (18:52 +0000)
committerGregor Schneider <grschneider@gmail.com>
Sun, 16 Aug 2009 18:52:06 +0000 (18:52 +0000)
svn path=/trunk/; revision=42739

reactos/subsystems/win32/win32k/eng/bitblt.c

index be39c20..3c65aaa 100644 (file)
@@ -67,8 +67,8 @@ BltMask(SURFOBJ* psoDest,
             psoPattern = &psurfPattern->SurfObj;
             PatternWidth = psoPattern->sizlBitmap.cx;
             PatternHeight = psoPattern->sizlBitmap.cy;
             psoPattern = &psurfPattern->SurfObj;
             PatternWidth = psoPattern->sizlBitmap.cx;
             PatternHeight = psoPattern->sizlBitmap.cy;
+            fnPattern_GetPixel = DibFunctionsForBitmapFormat[psoPattern->iBitmapFormat].DIB_GetPixel;
         }
         }
-        fnPattern_GetPixel = DibFunctionsForBitmapFormat[psoPattern->iBitmapFormat].DIB_GetPixel;
     }
     else
         psurfPattern = NULL;
     }
     else
         psurfPattern = NULL;