mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 20:49:24 +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 :
|
// true if position between ) and :
|
||||||
begin
|
begin
|
||||||
Result:=false;
|
Result:=false;
|
||||||
|
if ProcNode=nil then exit;
|
||||||
if ProcNode.Desc=ctnProcedure then begin
|
if ProcNode.Desc=ctnProcedure then begin
|
||||||
ProcNode:=ProcNode.FirstChild;
|
ProcNode:=ProcNode.FirstChild;
|
||||||
if ProcNode=nil then exit;
|
if ProcNode=nil then exit;
|
||||||
@ -854,7 +855,7 @@ begin
|
|||||||
exit;
|
exit;
|
||||||
MoveCursorToCleanPos(ProcNode.FirstChild.EndPos);
|
MoveCursorToCleanPos(ProcNode.FirstChild.EndPos);
|
||||||
end else begin
|
end else begin
|
||||||
MoveCursorToNodeStart(ProcNode.FirstChild);
|
MoveCursorToNodeStart(ProcNode);
|
||||||
ReadNextAtom;
|
ReadNextAtom;
|
||||||
if AtomIsIdentifier(false) then begin
|
if AtomIsIdentifier(false) then begin
|
||||||
// read name
|
// read name
|
||||||
|
Loading…
Reference in New Issue
Block a user