From c71417ce24c7de55ff59d6baea712ecfcfcdb8c9 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 2 Apr 2002 03:00:00 +0000 Subject: [PATCH] Fixed crash in BitBlt when source DC is NULL. --- graphics/bitblt.c | 2 +- graphics/x11drv/bitblt.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/graphics/bitblt.c b/graphics/bitblt.c index a20613c6014..d876fc64f94 100644 --- a/graphics/bitblt.c +++ b/graphics/bitblt.c @@ -85,7 +85,7 @@ BOOL WINAPI BitBlt( HDC hdcDst, INT xDst, INT yDst, INT width, hdcDst, xDst, yDst, width, height, dcDst->bitsPerPixel, rop); if (dcDst->funcs->pBitBlt) ret = dcDst->funcs->pBitBlt( dcDst->physDev, xDst, yDst, width, height, - dcSrc->physDev, xSrc, ySrc, rop ); + dcSrc ? dcSrc->physDev : NULL, xSrc, ySrc, rop ); if (dcSrc) GDI_ReleaseObj( hdcSrc ); GDI_ReleaseObj( hdcDst ); } diff --git a/graphics/x11drv/bitblt.c b/graphics/x11drv/bitblt.c index e2ebb74924b..640626877da 100644 --- a/graphics/x11drv/bitblt.c +++ b/graphics/x11drv/bitblt.c @@ -1503,7 +1503,7 @@ BOOL X11DRV_BitBlt( X11DRV_PDEVICE *physDevDst, INT xDst, INT yDst, BOOL result = FALSE; INT sSrc, sDst; RECT visRectDst, visRectSrc; - DC *dcSrc = physDevSrc->dc; + DC *dcSrc = physDevSrc ? physDevSrc->dc : NULL; DC *dcDst = physDevDst->dc; if (((rop >> 16) & 0x55) == ((rop >> 17) & 0x55)) {