diff --git a/mlvwm/menus.c b/mlvwm/menus.c index 5749ca2..f0bd0e1 100644 --- a/mlvwm/menus.c +++ b/mlvwm/menus.c @@ -1409,9 +1409,8 @@ void MapMenuBar( MlvwmWindow *win ) void ChangeMenuLabel( MenuLabel *ml, char *newl, Icon *miniicon ) { if( newl==NULL && ml->xpm==miniicon ) return; - if( ml->LabelStr && !strcmp(ml->LabelStr, newl )){ - if( ml->LabelStr ) - free( ml->LabelStr ); + if(( ml->LabelStr && newl && !strcmp(ml->LabelStr, newl )) || (ml->LabelStr && !newl)) { + free( ml->LabelStr ); ml->LabelStr = newl; } ml->xpm = miniicon;