mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 05:59:30 +02:00
IDEIntf: TIDEMenuItem: fixed not freeing MenuItems of TMenu
git-svn-id: trunk@54988 -
This commit is contained in:
parent
d4aa6c91b2
commit
5508095cff
@ -730,7 +730,7 @@ begin
|
|||||||
if FMenuItem <> nil then begin
|
if FMenuItem <> nil then begin
|
||||||
FMenuItem.OnClick := nil;
|
FMenuItem.OnClick := nil;
|
||||||
FMenuItem.RemoveHandlerOnDestroy(@MenuItemDestroy);
|
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.Free;
|
||||||
FMenuItem:=nil;
|
FMenuItem:=nil;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user