codetools: fixed crash on checking position in funcresultytoe

git-svn-id: trunk@20274 -
This commit is contained in:
mattias 2009-05-28 05:28:25 +00:00
parent b6cec7a960
commit faabdd53fd

View File

@ -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