From 30dc42912ee14f51ee4a99d6a545e8b3cebc68f7 Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Thu, 11 Mar 2004 00:41:28 +0000 Subject: [PATCH] We need to set the new text even if the old text string was NULL. --- controls/menu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/controls/menu.c b/controls/menu.c index dc058b6164d..914b29cc294 100644 --- a/controls/menu.c +++ b/controls/menu.c @@ -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 ); } }