From d25d085dbba0985dc4466e19ef1d9d7076b45f44 Mon Sep 17 00:00:00 2001 From: Martin Date: Thu, 9 Jan 2025 11:44:15 +0100 Subject: [PATCH] FpDebug: Do not free current DbgThread while still in use / Will be freed after next run/step. (Linux) --- components/fpdebug/fpdbglinuxclasses.pas | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/fpdebug/fpdbglinuxclasses.pas b/components/fpdebug/fpdbglinuxclasses.pas index b5e943764a..0371d5ccc0 100644 --- a/components/fpdebug/fpdbglinuxclasses.pas +++ b/components/fpdebug/fpdbglinuxclasses.pas @@ -2050,7 +2050,8 @@ begin TDbgThread(ThreadToPause) := it.Current; if ThreadToPause.FHasExited then begin Process.RemoveThread(ThreadToPause.ID); // TODO: postpone ? - ThreadToPause.Free; + if ThreadToPause <> AThread then + ThreadToPause.Free; end; it.Next; end;