mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-16 02:20:30 +01:00
FpDebug: Fix a potential double-free
git-svn-id: trunk@62320 -
This commit is contained in:
parent
b206664b05
commit
d506a29b8c
@ -824,7 +824,7 @@ begin
|
||||
exit;
|
||||
end;
|
||||
|
||||
FCommandToBeFreed.Free;
|
||||
FreeAndNil(FCommandToBeFreed);
|
||||
if FCommand <> nil then
|
||||
FCommand.DoBeforeLoopStart;
|
||||
|
||||
@ -1069,7 +1069,8 @@ begin
|
||||
OnHitBreakpointEvent(continue, nil);
|
||||
end;
|
||||
|
||||
if not &continue then begin
|
||||
if (not &continue) and (FCommand <> nil) then begin
|
||||
assert(FCommandToBeFreed=nil, 'TDbgController.SendEvents: FCommandToBeFreed=nil');
|
||||
FCommandToBeFreed := FCommand;
|
||||
FCommand := nil;
|
||||
end;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user