From 34c95ebef0b200b557a6eafa90774823c53cf8fe Mon Sep 17 00:00:00 2001 From: mattias Date: Thu, 18 May 2017 23:57:50 +0000 Subject: [PATCH] IDEIntf: TIDEMenuItem: fixed not freeing MenuItems of TMenu git-svn-id: branches/fixes_1_8@54989 - --- components/ideintf/menuintf.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/ideintf/menuintf.pas b/components/ideintf/menuintf.pas index 188609aac2..06130a8972 100644 --- a/components/ideintf/menuintf.pas +++ b/components/ideintf/menuintf.pas @@ -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;