diff --git a/components/fpdebug/fpdbglinuxclasses.pas b/components/fpdebug/fpdbglinuxclasses.pas index 8d4ed934e4..e1d6c6280b 100644 --- a/components/fpdebug/fpdbglinuxclasses.pas +++ b/components/fpdebug/fpdbglinuxclasses.pas @@ -1926,7 +1926,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;