lcl: fixed setting TMenuItem.Visible without Parent

git-svn-id: branches/fixes_1_6@52916 -
This commit is contained in:
mattias 2016-09-05 12:10:22 +00:00
parent b98b550355
commit 6b1eeb12fc

View File

@ -1353,7 +1353,8 @@ begin
if AValue then
begin
FVisible := AValue;
if (not (csLoading in ComponentState)) and Parent.HandleAllocated then
if (not (csLoading in ComponentState)) and (Parent<>nil)
and Parent.HandleAllocated then
HandleNeeded;
if HandleAllocated then
TWSMenuItemClass(WidgetSetClass).SetVisible(Self, True);