If source and destination are the same object, don't lock the object

twice as it will only be unlocked once.
oldstable
Jukka Heinonen 2004-04-26 20:06:08 +00:00 committed by Alexandre Julliard
parent 2b5b00b0ff
commit 6d58de6374
1 changed files with 5 additions and 1 deletions

View File

@ -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))