FpDebug: Fixed passing dangling pointer. (Currently not used by LazDebuggerFp when doing deExitProcess)

This commit is contained in:
Martin 2021-12-06 15:59:33 +01:00
parent 4f94496f20
commit 7534833eb6

View File

@ -1713,7 +1713,9 @@ begin
if FPDEvent=deExitProcess then begin
FreeAndNil(FCommand);
if assigned(FOnThreadProcessLoopCycleEvent) then begin
CurCmd := nil;
FOnThreadProcessLoopCycleEvent(AExit, FPDEvent, CurCmd, IsFinished);
FreeAndNil(CurCmd);
FPDEvent := deExitProcess;
end;
break;