From 6d58de6374b89b2c72265d6c94555d2b4b991c71 Mon Sep 17 00:00:00 2001 From: Jukka Heinonen Date: Mon, 26 Apr 2004 20:06:08 +0000 Subject: [PATCH] If source and destination are the same object, don't lock the object twice as it will only be unlocked once. --- dlls/x11drv/bitblt.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dlls/x11drv/bitblt.c b/dlls/x11drv/bitblt.c index 0f018328291..3a559ad6f50 100644 --- a/dlls/x11drv/bitblt.c +++ b/dlls/x11drv/bitblt.c @@ -1552,8 +1552,12 @@ BOOL X11DRV_BitBlt( X11DRV_PDEVICE *physDevDst, INT xDst, INT yDst, * we can pass TRUE instead of FALSE to CoerceDIBSection(dcDst...), * which may avoid a copy in some situations */ } + sDst = X11DRV_LockDIBSection( physDevDst, DIB_Status_None, FALSE ); - sSrc = X11DRV_LockDIBSection( physDevSrc, DIB_Status_None, FALSE ); + if (physDevDst != physDevSrc) + sSrc = X11DRV_LockDIBSection( physDevSrc, DIB_Status_None, FALSE ); + else + sSrc = sDst; if ((sSrc == DIB_Status_AppMod) && (rop == SRCCOPY) && (physDevSrc->depth == physDevDst->depth)) -- 2.11.4.GIT