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

(cherry picked from commit 7534833eb6)
This commit is contained in:
Martin 2021-12-06 15:59:33 +01:00
parent 2ce918ee2e
commit 9979693585

View File

@ -1691,7 +1691,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;