mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 20:39:25 +02:00
FpDebug: PascalParser fix nil object access.
(cherry picked from commit f2cbe3d582
)
This commit is contained in:
parent
8eaeb82d09
commit
5eca6fa255
@ -1854,6 +1854,10 @@ var
|
|||||||
var
|
var
|
||||||
BracketPart: TFpPascalExpressionPartBracket;
|
BracketPart: TFpPascalExpressionPartBracket;
|
||||||
begin
|
begin
|
||||||
|
if (CurPart=nil) then begin
|
||||||
|
SetError(fpErrPasParserUnexpectedToken, [GetFirstToken(CurPtr), PosFromPChar(CurPtr)]);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
BracketPart := CurPart.SurroundingBracket;
|
BracketPart := CurPart.SurroundingBracket;
|
||||||
if BracketPart = nil then begin
|
if BracketPart = nil then begin
|
||||||
SetError('Closing bracket found without opening')
|
SetError('Closing bracket found without opening')
|
||||||
@ -1919,7 +1923,7 @@ var
|
|||||||
|
|
||||||
procedure HandleComma;
|
procedure HandleComma;
|
||||||
begin
|
begin
|
||||||
if not CurPart.HandleSeparator(ppstComma) then
|
if (CurPart=nil) or (not CurPart.HandleSeparator(ppstComma)) then
|
||||||
SetError(fpErrPasParserUnexpectedToken, [GetFirstToken(CurPtr), PosFromPChar(CurPtr)]);
|
SetError(fpErrPasParserUnexpectedToken, [GetFirstToken(CurPtr), PosFromPChar(CurPtr)]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user