ModernSettings: Use smart pointers

This commit is contained in:
ge0rdi
2020-08-31 20:11:50 +02:00
parent e210b4a65a
commit 9752afbebc
3 changed files with 7 additions and 13 deletions
@@ -5,6 +5,7 @@
#include "stdafx.h"
#include "ModernSettings.h"
#include "ModernSettingsContextMenu.h"
#include "ComHelper.h"
#define MENUVERB_OPEN 0
@@ -177,13 +178,10 @@ HRESULT CModernSettingsContextMenu::InvokeCommand(LPCMINVOKECOMMANDINFO pici)
{
if (uID == MENUVERB_OPEN && m_pdtobj)
{
LPITEMIDLIST pidl;
CAbsolutePidl pidl;
hr = SHGetIDListFromObject(m_pdtobj, &pidl);
if (SUCCEEDED(hr))
{
hr = OpenItemByPidl(pidl);
ILFree(pidl);
}
}
}