mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 17:44:45 +00:00
[MSPAINT] Fix handle leaks about memory bitmap
This fixes CORE-18919. CORE-18867
This commit is contained in:
parent
bfc6a119c5
commit
a9284b5664
2 changed files with 2 additions and 2 deletions
|
@ -164,7 +164,7 @@ VOID CCanvasWindow::DoDraw(HDC hDC, RECT& rcClient, RECT& rcPaint)
|
|||
rcPaint.right - rcPaint.left, rcPaint.bottom - rcPaint.top,
|
||||
hdcMem, rcPaint.left, rcPaint.top, SRCCOPY);
|
||||
|
||||
::SelectObject(hdcMem, hbmOld);
|
||||
::DeleteObject(::SelectObject(hdcMem, hbmOld));
|
||||
::DeleteDC(hdcMem);
|
||||
}
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@ LRESULT CPaletteWindow::OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& b
|
|||
/* Transfer bits (hDC <-- hMemDC) */
|
||||
::BitBlt(hDC, 0, 0, rcClient.right, rcClient.bottom, hMemDC, 0, 0, SRCCOPY);
|
||||
|
||||
::SelectObject(hMemDC, hbmOld);
|
||||
::DeleteObject(::SelectObject(hMemDC, hbmOld));
|
||||
::DeleteDC(hMemDC);
|
||||
EndPaint(&ps);
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue