From 4fd9cec6c7f58ecc528b46a87f9538cf85a06774 Mon Sep 17 00:00:00 2001 From: wp_xyz Date: Wed, 14 May 2025 16:39:18 +0200 Subject: [PATCH] LCL/TreeView: Fix compilation in FPC 3.3.1 after change in FreeAndNil in commit 3df8de199470da796a9c00fc01f7ed6c3a07dc18 --- .../lazdebuggerfp/fpdebugdebuggerworkthreads.pas | 5 ++++- lcl/include/treeview.inc | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/components/lazdebuggers/lazdebuggerfp/fpdebugdebuggerworkthreads.pas b/components/lazdebuggers/lazdebuggerfp/fpdebugdebuggerworkthreads.pas index 7cac985f08..e343d6a70e 100644 --- a/components/lazdebuggers/lazdebuggerfp/fpdebugdebuggerworkthreads.pas +++ b/components/lazdebuggers/lazdebuggerfp/fpdebugdebuggerworkthreads.pas @@ -1364,7 +1364,10 @@ begin CB := nil; try if FEvalFlags * [defNoTypeInfo, defSimpleTypeInfo, defFullTypeInfo] = [defNoTypeInfo] then - FreeAndNil(FResText); + begin + FResText := ''; +// FreeAndNil(FResText); + end; if (FCallback <> nil) then begin // All to local vars, because SELF may be destroyed before/while the callback happens diff --git a/lcl/include/treeview.inc b/lcl/include/treeview.inc index 5d2cb49982..7c3d34f463 100644 --- a/lcl/include/treeview.inc +++ b/lcl/include/treeview.inc @@ -783,7 +783,7 @@ procedure TTreeNode.FreeAllNodeData; var i: Integer; begin - FreeAndNil(FData); + FreeAndNil(TObject(FData)); for i:=0 to Count-1 do Items[i].FreeAllNodeData; end;