IDEIntf: TIDEMenuItem: fixed not freeing MenuItems of TMenu

git-svn-id: branches/fixes_1_8@54989 -
This commit is contained in:
mattias 2017-05-18 23:57:50 +00:00
parent fb14783b7c
commit 34c95ebef0

View File

@ -730,7 +730,7 @@ begin
if FMenuItem <> nil then begin
FMenuItem.OnClick := nil;
FMenuItem.RemoveHandlerOnDestroy(@MenuItemDestroy);
if (Section<>nil) or (FMenuItem.Parent<>nil) then
if (FMenuItem.Menu=nil) and ((Section<>nil) or (FMenuItem.Parent<>nil)) then
FMenuItem.Free;
FMenuItem:=nil;
end;