mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-09 11:19:45 +02:00
IDE, SynEdit: fixed a crash/mem-access violation, if restoring a breakpoint to a no longer existing line
git-svn-id: trunk@27892 -
This commit is contained in:
parent
a0bf2b0be8
commit
bbebbdd3cd
@ -743,7 +743,8 @@ function TIDESynGutterMarks.SourceLineToDebugLine(aLinePos: Integer;
|
||||
AdjustOnError: Boolean): Integer;
|
||||
begin
|
||||
CheckTextBuffer;
|
||||
if (aLinePos < 1) or (not HasDebugMarks) then exit(aLinePos);
|
||||
if (aLinePos < 1) or (not HasDebugMarks) or (aLinePos >= FDebugMarkInfo.Count) then
|
||||
exit(aLinePos);
|
||||
Result := FDebugMarkInfo[aLinePos - 1];
|
||||
while (Result = 0) and AdjustOnError and (aLinePos < FDebugMarkInfo.Count-1) do begin
|
||||
inc(aLinePos);
|
||||
|
Loading…
Reference in New Issue
Block a user