We need to set the new text even if the old text string was NULL.
This commit is contained in:
parent
cf8a25f0d7
commit
30dc42912e
@ -4237,8 +4237,9 @@ static BOOL SetMenuItemInfo_common(MENUITEM * menu,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (lpmii->fMask & MIIM_STRING ) {
|
if (lpmii->fMask & MIIM_STRING ) {
|
||||||
|
if (IS_STRING_ITEM(menu->fType)) {
|
||||||
/* free the string when used */
|
/* free the string when used */
|
||||||
if (IS_STRING_ITEM(menu->fType) && menu->text) {
|
if(menu->text)
|
||||||
HeapFree(GetProcessHeap(), 0, menu->text);
|
HeapFree(GetProcessHeap(), 0, menu->text);
|
||||||
set_menu_item_text( menu, lpmii->dwTypeData, unicode );
|
set_menu_item_text( menu, lpmii->dwTypeData, unicode );
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user