AnchorDocking: Fixed SIGSEGV when starting application with -dVerboseAnchorDockRestore.

git-svn-id: trunk@60107 -
This commit is contained in:
michl 2019-01-19 14:56:12 +00:00
parent 90b424680b
commit c3186f7af3

View File

@ -3483,7 +3483,11 @@ begin
EnableAllAutoSizing;
end;
{$IFDEF VerboseAnchorDockRestore}
DebugWriteChildAnchors(Application.MainForm,true,false);
if Assigned(Application.MainForm) then
DebugWriteChildAnchors(Application.MainForm,true,false)
else
if (ControlCount>0) and (Controls[0] is TWinControl) then
DebugWriteChildAnchors(TWinControl(Controls[0]),true,false);
{$ENDIF}
Result:=true;
end;