mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-07-07 17:45:54 +02:00
ide: fix a memory leak I made in TSourceEditor.OnGutterClick
git-svn-id: trunk@18964 -
This commit is contained in:
parent
0ecf4167d0
commit
09b40cf1b1
@ -2088,21 +2088,26 @@ var
|
|||||||
begin
|
begin
|
||||||
// create or delete breakpoint
|
// create or delete breakpoint
|
||||||
// find breakpoint mark at line
|
// find breakpoint mark at line
|
||||||
SourceEditorMarks.GetMarksForLine(FEditor, Line, Marks, MarkCount);
|
Marks := nil;
|
||||||
BreakFound := False;
|
try
|
||||||
ExecutionFound := False;
|
SourceEditorMarks.GetMarksForLine(FEditor, Line, Marks, MarkCount);
|
||||||
for i := 0 to MarkCount - 1 do
|
BreakFound := False;
|
||||||
begin
|
ExecutionFound := False;
|
||||||
if not Marks[i].Visible then
|
for i := 0 to MarkCount - 1 do
|
||||||
Continue;
|
|
||||||
if Marks[i].IsBreakPoint then
|
|
||||||
begin
|
begin
|
||||||
BreakFound := True;
|
if not Marks[i].Visible then
|
||||||
DebugBoss.DoDeleteBreakPointAtMark(Marks[i])
|
Continue;
|
||||||
end
|
if Marks[i].IsBreakPoint then
|
||||||
else
|
begin
|
||||||
if Marks[i] = FExecutionMark then
|
BreakFound := True;
|
||||||
ExecutionFound := True;
|
DebugBoss.DoDeleteBreakPointAtMark(Marks[i])
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if Marks[i] = FExecutionMark then
|
||||||
|
ExecutionFound := True;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
FreeMem(Marks);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if not BreakFound then
|
if not BreakFound then
|
||||||
|
Loading…
Reference in New Issue
Block a user