Commit 30dc4291 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

We need to set the new text even if the old text string was NULL.

parent cf8a25f0
......@@ -4237,9 +4237,10 @@ static BOOL SetMenuItemInfo_common(MENUITEM * menu,
}
if (lpmii->fMask & MIIM_STRING ) {
/* free the string when used */
if (IS_STRING_ITEM(menu->fType) && menu->text) {
HeapFree(GetProcessHeap(), 0, menu->text);
if (IS_STRING_ITEM(menu->fType)) {
/* free the string when used */
if(menu->text)
HeapFree(GetProcessHeap(), 0, menu->text);
set_menu_item_text( menu, lpmii->dwTypeData, unicode );
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment