mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 01:39:18 +02:00
codetools: fixed crash on checking position in funcresultytoe
git-svn-id: trunk@20274 -
This commit is contained in:
parent
b6cec7a960
commit
faabdd53fd
@ -842,6 +842,7 @@ function TPascalReaderTool.PositionInFuncResultName(ProcNode: TCodeTreeNode;
|
||||
// true if position between ) and :
|
||||
begin
|
||||
Result:=false;
|
||||
if ProcNode=nil then exit;
|
||||
if ProcNode.Desc=ctnProcedure then begin
|
||||
ProcNode:=ProcNode.FirstChild;
|
||||
if ProcNode=nil then exit;
|
||||
@ -854,7 +855,7 @@ begin
|
||||
exit;
|
||||
MoveCursorToCleanPos(ProcNode.FirstChild.EndPos);
|
||||
end else begin
|
||||
MoveCursorToNodeStart(ProcNode.FirstChild);
|
||||
MoveCursorToNodeStart(ProcNode);
|
||||
ReadNextAtom;
|
||||
if AtomIsIdentifier(false) then begin
|
||||
// read name
|
||||
|
Loading…
Reference in New Issue
Block a user