diff options
author | George Hazan <ghazan@miranda.im> | 2019-04-12 23:06:16 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-04-12 23:06:16 +0300 |
commit | 1962493ef2d0111b548d89149ad3bf8424704cf1 (patch) | |
tree | 0d0f94b2bc9d086a21838a0c9cbcce0180dc0504 | |
parent | d2f5ad41bb7f997495f90e7a508dea77da42939f (diff) |
helper should be applied here to avoid a leak
-rw-r--r-- | src/mir_app/src/ei_options.cpp | 5 |
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) { |