codetools: fixed crash

git-svn-id: trunk@30943 -
This commit is contained in:
mattias 2011-05-27 21:38:02 +00:00
parent 0642328271
commit 40015048ed
2 changed files with 6 additions and 0 deletions

View File

@ -7216,6 +7216,7 @@ var
while BodyAVLNode<>nil do begin
BodyNodeExt:=TCodeTreeNodeExtension(BodyAVLNode.Data);
if ClassProcs.Find(BodyNodeExt)=nil then begin
// this bdy has no def
AddNodeExtToTree(BodiesWithoutDefs,BodyNodeExt);
end;
BodyAVLNode:=ProcBodyNodes.FindSuccessor(BodyAVLNode);
@ -7279,6 +7280,7 @@ var
end;
// replace body proc head(s) with class proc head(s)
if UpdateDefsToBodies=nil then exit;
DefAVLNode:=UpdateDefsToBodies.FindLowest;
while DefAVLNode<>nil do begin
DefNodeExt:=TCodeTreeNodeExtension(DefAVLNode.Data);

View File

@ -371,6 +371,7 @@ type
procedure ClearFoundMethods;
function CollectMethods(Params: TFindDeclarationParams;
const FoundContext: TFindContext): TIdentifierFoundResult;
//procedure CheckCompilerDirective;
public
function GatherIdentifiers(const CursorPos: TCodeXYPosition;
var IdentifierList: TIdentifierList;
@ -2004,6 +2005,9 @@ begin
try
InitCollectIdentifiers(CursorPos,IdentifierList);
IdentStartXY:=FindIdentifierStartPos(CursorPos);
//CheckCompilerDirective;
ParseSourceTillCollectionStart(IdentStartXY,CleanCursorPos,CursorNode,
IdentStartPos,IdentEndPos);
if CleanCursorPos=0 then ;