From c3186f7af3eb3fe55e6cd488d0912f2a7493f685 Mon Sep 17 00:00:00 2001 From: michl Date: Sat, 19 Jan 2019 14:56:12 +0000 Subject: [PATCH] AnchorDocking: Fixed SIGSEGV when starting application with -dVerboseAnchorDockRestore. git-svn-id: trunk@60107 - --- components/anchordocking/anchordocking.pas | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/anchordocking/anchordocking.pas b/components/anchordocking/anchordocking.pas index 3b598a2565..09f3128ee6 100644 --- a/components/anchordocking/anchordocking.pas +++ b/components/anchordocking/anchordocking.pas @@ -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;