mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-30 10:29:29 +02:00
LCL: destroy menu handle on remove. Issue #30806, patch by Michl
git-svn-id: trunk@53250 -
This commit is contained in:
parent
4d69ed3456
commit
4161b1f5e1
@ -1743,7 +1743,11 @@ begin
|
||||
if (Screen.Forms[I].Menu = Value) and (Screen.Forms[I] <> Self) then
|
||||
raise EInvalidOperation.CreateFmt(sDuplicateMenus, [Value.Name]);
|
||||
|
||||
if FMenu <> nil then FMenu.Parent := nil;
|
||||
if FMenu <> nil then
|
||||
begin
|
||||
FMenu.DestroyHandle;
|
||||
FMenu.Parent := nil;
|
||||
end;
|
||||
|
||||
if (csDestroying in ComponentState) or
|
||||
((Value <> nil) and (csDestroying in Value.ComponentState)) then
|
||||
|
Loading…
Reference in New Issue
Block a user