diff --git a/lcl/include/menuitem.inc b/lcl/include/menuitem.inc index b85fc400c5..61d25f9dbe 100644 --- a/lcl/include/menuitem.inc +++ b/lcl/include/menuitem.inc @@ -884,7 +884,7 @@ procedure TMenuItem.SetCaption(const AValue: string); begin if FCaption = AValue then exit; FCaption := AValue; - if HandleAllocated then + if HandleAllocated and ((Parent<>nil) or (FMenu=nil)) then TWSMenuItemClass(WidgetSetClass).SetCaption(Self, AValue); OwnerFormDesignerModified(Self); end;