AnchorDocking: Remove all handlers of Forms when DockMaster is destroyed. Patch by Anton Kavalenka

This commit is contained in:
michl 2021-10-09 16:59:11 +02:00
parent e67c74ed7e
commit 11191cc81c

View File

@ -3150,6 +3150,11 @@ var
AControl: TControl;
i, j: Integer;
begin
if Assigned(FFormStyles) and not Application.Terminated then
for i:=FFormStyles.Count-1 downto 0 do
begin
FFormStyles[i].Form.RemoveAllHandlersOfObject(Self);
end;
Screen.RemoveHandlerFormAdded(@ScreenFormAdded);
Screen.RemoveHandlerRemoveForm(@ScreenRemoveForm);
QueueSimplify:=false;