mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-16 03:23:56 +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,6 +2088,8 @@ var
|
|||||||
begin
|
begin
|
||||||
// create or delete breakpoint
|
// create or delete breakpoint
|
||||||
// find breakpoint mark at line
|
// find breakpoint mark at line
|
||||||
|
Marks := nil;
|
||||||
|
try
|
||||||
SourceEditorMarks.GetMarksForLine(FEditor, Line, Marks, MarkCount);
|
SourceEditorMarks.GetMarksForLine(FEditor, Line, Marks, MarkCount);
|
||||||
BreakFound := False;
|
BreakFound := False;
|
||||||
ExecutionFound := False;
|
ExecutionFound := False;
|
||||||
@ -2104,6 +2106,9 @@ begin
|
|||||||
if Marks[i] = FExecutionMark then
|
if Marks[i] = FExecutionMark then
|
||||||
ExecutionFound := True;
|
ExecutionFound := True;
|
||||||
end;
|
end;
|
||||||
|
finally
|
||||||
|
FreeMem(Marks);
|
||||||
|
end;
|
||||||
|
|
||||||
if not BreakFound then
|
if not BreakFound then
|
||||||
DebugBoss.DoCreateBreakPoint(Filename, Line, True);
|
DebugBoss.DoCreateBreakPoint(Filename, Line, True);
|
||||||
|
Loading…
Reference in New Issue
Block a user