summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-04-12 23:06:16 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-04-12 23:06:16 +0300
commit1962493ef2d0111b548d89149ad3bf8424704cf1 (patch)
tree0d0f94b2bc9d086a21838a0c9cbcce0180dc0504
parentd2f5ad41bb7f997495f90e7a508dea77da42939f (diff)
helper should be applied here to avoid a leak
-rw-r--r--src/mir_app/src/ei_options.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/mir_app/src/ei_options.cpp b/src/mir_app/src/ei_options.cpp
index 8c213e209d..ef3c7dd14f 100644
--- a/src/mir_app/src/ei_options.cpp
+++ b/src/mir_app/src/ei_options.cpp
@@ -414,9 +414,7 @@ public:
void BuildIconList()
{
HIMAGELIST hImageList = ImageList_Create(g_iIconSX, g_iIconSX, ILC_COLOR32 | ILC_MASK, 2, 2);
-
- HICON hBlankIcon = (HICON)LoadImage(g_plugin.getInst(), MAKEINTRESOURCE(IDI_BLANK), IMAGE_ICON, g_iIconSX, g_iIconSX, 0);
- ImageList_AddIcon(hImageList, hBlankIcon);
+ ImageList_AddIcon_NotShared(hImageList, MAKEINTRESOURCE(IDI_BLANK));
for (auto &extra : registeredExtraIcons) {
extra->setID(registeredExtraIcons.indexOf(&extra)+1);
@@ -430,7 +428,6 @@ public:
}
}
m_tree.SetImageList(hImageList, TVSIL_NORMAL);
- DestroyIcon(hBlankIcon);
for (auto &extra : extraIconsBySlot) {
if (extra->getType() == EXTRAICON_TYPE_GROUP) {