diff options
author | George Hazan <george.hazan@gmail.com> | 2013-03-08 20:55:34 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-03-08 20:55:34 +0000 |
commit | a4498f183c28fb10af04e94d1236b795b06bf7a5 (patch) | |
tree | f0aba6d3cbfd14ba41e53b7161e020af9200dc09 /plugins/MyDetails | |
parent | 7e2a1c233ab2eac8e3f65dd1ee1647b336ef588c (diff) |
some memory leak fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@3925 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MyDetails')
-rw-r--r-- | plugins/MyDetails/src/frame.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/MyDetails/src/frame.cpp b/plugins/MyDetails/src/frame.cpp index 61a4f9d0c6..795d3b1a48 100644 --- a/plugins/MyDetails/src/frame.cpp +++ b/plugins/MyDetails/src/frame.cpp @@ -1121,7 +1121,7 @@ void Draw(HWND hwnd, HDC hdc_orig) HDC hdc = CreateCompatibleDC(hdc_orig);
HBITMAP hBmp = CreateBitmap32(r.right,r.bottom);
- SelectObject(hdc, hBmp);
+ HBITMAP old_bitmap = (HBITMAP)SelectObject(hdc, hBmp);
int old_bk_mode = SetBkMode(hdc, TRANSPARENT);
HFONT old_font = (HFONT) SelectObject(hdc, hFont[0]);
@@ -1369,6 +1369,8 @@ void Draw(HWND hwnd, HDC hdc_orig) BitBlt(hdc_orig, r_full.left, r_full.top, r_full.right - r_full.left,
r_full.bottom - r_full.top, hdc, r_full.left, r_full.top, SRCCOPY);
+
+ SelectObject(hdc, old_bitmap);
DeleteDC(hdc);
DeleteObject(hBmp);
}
|