summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/chat/tools.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TabSRMM/src/chat/tools.cpp')
-rw-r--r--plugins/TabSRMM/src/chat/tools.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/TabSRMM/src/chat/tools.cpp b/plugins/TabSRMM/src/chat/tools.cpp
index f9d2f56a46..c9e5e5cfd7 100644
--- a/plugins/TabSRMM/src/chat/tools.cpp
+++ b/plugins/TabSRMM/src/chat/tools.cpp
@@ -598,11 +598,12 @@ UINT CreateGCMenu(HWND hwndDlg, HMENU *hMenu, int iIndex, POINT pt, SESSION_INFO
void DestroyGCMenu(HMENU *hMenu, int iIndex)
{
- MENUITEMINFO mi = { sizeof(MENUITEMINFO) };
- mi.fMask = MIIM_SUBMENU;
- while (GetMenuItemInfo(*hMenu, iIndex, TRUE, &mi)) {
- if (mi.hSubMenu != NULL)
- DestroyMenu(mi.hSubMenu);
+ MENUITEMINFO mii = { 0 };
+ mii.cbSize = sizeof(mii);
+ mii.fMask = MIIM_SUBMENU;
+ while (GetMenuItemInfo(*hMenu, iIndex, TRUE, &mii)) {
+ if (mii.hSubMenu != NULL)
+ DestroyMenu(mii.hSubMenu);
RemoveMenu(*hMenu, iIndex, MF_BYPOSITION);
}
}