mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 03:12:59 +00:00
Patch by Jeffrey Morlan <mrnobo1024 at yahoo.com>: Rearrange code in NtGdiSelectBitmap to prevent deadlock. See bug 3333.
svn path=/trunk/; revision=34097
This commit is contained in:
parent
968033dd41
commit
eec2739a8b
1 changed files with 3 additions and 3 deletions
|
@ -1955,6 +1955,9 @@ NtGdiSelectBitmap(
|
||||||
pDC->w.bitsPerPixel = BitsPerFormat(pBmp->SurfObj.iBitmapFormat);
|
pDC->w.bitsPerPixel = BitsPerFormat(pBmp->SurfObj.iBitmapFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hVisRgn = NtGdiCreateRectRgn(0, 0, pBmp->SurfObj.sizlBitmap.cx, pBmp->SurfObj.sizlBitmap.cy);
|
||||||
|
BITMAPOBJ_UnlockBitmap(pBmp);
|
||||||
|
|
||||||
/* Regenerate the XLATEOBJs. */
|
/* Regenerate the XLATEOBJs. */
|
||||||
pBrush = BRUSHOBJ_LockBrush(pDc_Attr->hbrush);
|
pBrush = BRUSHOBJ_LockBrush(pDc_Attr->hbrush);
|
||||||
if (pBrush)
|
if (pBrush)
|
||||||
|
@ -1980,9 +1983,6 @@ NtGdiSelectBitmap(
|
||||||
|
|
||||||
DC_UnlockDc(pDC);
|
DC_UnlockDc(pDC);
|
||||||
|
|
||||||
hVisRgn = NtGdiCreateRectRgn(0, 0, pBmp->SurfObj.sizlBitmap.cx, pBmp->SurfObj.sizlBitmap.cy);
|
|
||||||
BITMAPOBJ_UnlockBitmap(pBmp);
|
|
||||||
|
|
||||||
if (hVisRgn)
|
if (hVisRgn)
|
||||||
{
|
{
|
||||||
GdiSelectVisRgn(hDC, hVisRgn);
|
GdiSelectVisRgn(hDC, hVisRgn);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue