menu: MIIM_STRING fix
Huw D M Davies
h.davies1 at physics.ox.ac.uk
Wed Mar 10 08:49:33 CST 2004
Huw Davies <huw at codeweavers.com>
We need to set the new text even if the old text string was NULL
--
Huw Davies
huw at codeweavers.com
Index: controls/menu.c
===================================================================
RCS file: /home/wine/wine/controls/menu.c,v
retrieving revision 1.176
diff -u -r1.176 menu.c
--- controls/menu.c 17 Feb 2004 20:29:05 -0000 1.176
+++ controls/menu.c 10 Mar 2004 14:45:35 -0000
@@ -4237,9 +4237,10 @@
}
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 );
}
}
More information about the wine-patches
mailing list