mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 10:59:11 +02:00
FpDebug: PascalParser fix nil object access.
This commit is contained in:
parent
1bc575aeff
commit
f2cbe3d582
@ -1855,6 +1855,10 @@ var
|
||||
var
|
||||
BracketPart: TFpPascalExpressionPartBracket;
|
||||
begin
|
||||
if (CurPart=nil) then begin
|
||||
SetError(fpErrPasParserUnexpectedToken, [GetFirstToken(CurPtr), PosFromPChar(CurPtr)]);
|
||||
exit;
|
||||
end;
|
||||
BracketPart := CurPart.SurroundingBracket;
|
||||
if BracketPart = nil then begin
|
||||
SetError('Closing bracket found without opening')
|
||||
@ -1920,7 +1924,7 @@ var
|
||||
|
||||
procedure HandleComma;
|
||||
begin
|
||||
if not CurPart.HandleSeparator(ppstComma) then
|
||||
if (CurPart=nil) or (not CurPart.HandleSeparator(ppstComma)) then
|
||||
SetError(fpErrPasParserUnexpectedToken, [GetFirstToken(CurPtr), PosFromPChar(CurPtr)]);
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user