[SHELL32] DestroyMenu on m_pShellMenu->SetMenu failure

CORE-13194
This commit is contained in:
Katayama Hirofumi MZ 2022-10-10 08:47:24 +09:00
parent 924a8fea10
commit 92c904addc

View file

@ -86,13 +86,16 @@ private:
if (FAILED_UNEXPECTEDLY(hr))
return hr;
hr = m_pTrayPriv->AppendMenuW(&hmenu);
hr = m_pTrayPriv->AppendMenu(&hmenu);
if (FAILED_UNEXPECTEDLY(hr))
return hr;
hr = m_pShellMenu->SetMenu(hmenu, NULL, SMSET_BOTTOM);
if (FAILED_UNEXPECTEDLY(hr))
{
DestroyMenu(hmenu);
return hr;
}
return hr;
}