Commit 4161b1f5 authored by ondrej's avatar ondrej
Browse files

LCL: destroy menu handle on remove. Issue #30806, patch by Michl

git-svn-id: trunk@53250 -
parent 4d69ed34
......@@ -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
FMenu.Parent := nil;
if (csDestroying in ComponentState) or
((Value <> nil) and (csDestroying in Value.ComponentState)) then
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment