From 5e8e561a80d1ac9ca1c2f1c3d388105733ed4e4e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 15 Jun 2012 10:58:04 +0000 Subject: crash fix git-svn-id: http://svn.miranda-ng.org/main/trunk@425 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/clist/genmenu.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/modules/clist/genmenu.cpp') diff --git a/src/modules/clist/genmenu.cpp b/src/modules/clist/genmenu.cpp index d38f0fbfc4..9395bb1588 100644 --- a/src/modules/clist/genmenu.cpp +++ b/src/modules/clist/genmenu.cpp @@ -789,9 +789,10 @@ static void InsertMenuItemWithSeparators(HMENU hMenu, int uItem, MENUITEMINFO *l int needSeparator = (p->mi.position / SEPARATORPOSITIONINTERVAL) != (pimi->mi.position / SEPARATORPOSITIONINTERVAL); if ( needSeparator) { //but might be supposed to be after the next one instead - mii.fType = 0; + memset(&mii, 0, sizeof(mii)); + mii.cbSize = MENUITEMINFO_V4_SIZE; if ( uItem < GetMenuItemCount( hMenu )) { - mii.fMask = MIIM_SUBMENU | MIIM_DATA | MIIM_TYPE; + mii.fMask = MIIM_TYPE; GetMenuItemInfo( hMenu, uItem, TRUE, &mii ); } if ( mii.fType != MFT_SEPARATOR) { @@ -804,8 +805,7 @@ static void InsertMenuItemWithSeparators(HMENU hMenu, int uItem, MENUITEMINFO *l //check for separator after if ( uItem < GetMenuItemCount( hMenu )) { - mii.fMask = MIIM_SUBMENU | MIIM_DATA | MIIM_TYPE; - mii.cch = 0; + mii.fMask = MIIM_TYPE; GetMenuItemInfo( hMenu, uItem, TRUE, &mii ); PMO_IntMenuItem p = MO_GetIntMenuItem(( HGENMENU )mii.dwItemData ); if ( p != NULL && mii.fType == MFT_SEPARATOR ) { -- cgit v1.2.3