Skip to content
Snippets Groups Projects
Commit e0a1a0b0 authored by Bart's avatar Bart :beetle:
Browse files

LCL Fix access violation when deleting a TMainMenu after r53250 #4161b1f5....

LCL Fix access violation when deleting a TMainMenu after r53250 #4161b1f5. Issue #30882. Patch by Michl.

git-svn-id: trunk@53306 -
parent f96014d3
No related branches found
No related tags found
No related merge requests found
......@@ -1743,7 +1743,7 @@ begin
if (Screen.Forms[I].Menu = Value) and (Screen.Forms[I] <> Self) then
raise EInvalidOperation.CreateFmt(sDuplicateMenus, [Value.Name]);
if FMenu <> nil then
if (FMenu <> nil) and not (csDestroying in FMenu.ComponentState) then
begin
FMenu.DestroyHandle;
FMenu.Parent := nil;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment