diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2013-02-10 20:15:00 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2013-02-10 20:15:00 +0000 |
commit | 8b3120de336f515ffd715c7939b4dc63770c32bd (patch) | |
tree | e9d000a4755130f4dc738c6eea132e4603e19227 /plugins/ModernOpt/src/mopt_selector.cpp | |
parent | 5feac927bfb6db11a138b6ce773b8704396c569c (diff) |
fixed crash on unloading plugin (fixes #47)
git-svn-id: http://svn.miranda-ng.org/main/trunk@3543 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/ModernOpt/src/mopt_selector.cpp')
-rw-r--r-- | plugins/ModernOpt/src/mopt_selector.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/plugins/ModernOpt/src/mopt_selector.cpp b/plugins/ModernOpt/src/mopt_selector.cpp index 42b15f51bb..563a6779ef 100644 --- a/plugins/ModernOpt/src/mopt_selector.cpp +++ b/plugins/ModernOpt/src/mopt_selector.cpp @@ -183,9 +183,6 @@ static void CreatePreview(TSelectorData *sd, TCHAR *fn, LPDRAWITEMSTRUCT lps) sd->hbmpPreview = CreateCompatibleBitmap(lps->hDC, lps->rcItem.right - lps->rcItem.left, lps->rcItem.bottom - lps->rcItem.top);
SelectObject(hdc, sd->hbmpPreview);
- RECT rc;
- HBRUSH hbr;
-
BITMAPINFO bi = {0};
bi.bmiHeader.biSize = sizeof(bi.bmiHeader);
bi.bmiHeader.biWidth = 8;
@@ -197,7 +194,8 @@ static void CreatePreview(TSelectorData *sd, TCHAR *fn, LPDRAWITEMSTRUCT lps) HBITMAP hBmpBrush = (HBITMAP)CreateDIBSection(0, &bi, DIB_RGB_COLORS, 0, 0, 0);
HDC dcBmp = CreateCompatibleDC(0);
HBITMAP hBmpSave = (HBITMAP)SelectObject(dcBmp, hBmpBrush);
- hbr = CreateSolidBrush(RGB(0xcc, 0xcc, 0xcc));
+ HBRUSH hbr = CreateSolidBrush(RGB(0xcc, 0xcc, 0xcc));
+ RECT rc;
SetRect(&rc, 0, 0, 8, 8);
FillRect(dcBmp, &rc, hbr);
DeleteObject(hbr);
|