codetools: identifier completion: fixed crash

git-svn-id: trunk@41263 -
This commit is contained in:
mattias 2013-05-18 21:36:32 +00:00
parent 53b20cfa97
commit f7647f0574

View File

@ -1133,11 +1133,10 @@ begin
begin begin
Ident:=FoundContext.Tool.GetProcNameIdentifier(FoundContext.Node); Ident:=FoundContext.Tool.GetProcNameIdentifier(FoundContext.Node);
NewItem := CurrentIdentifierList.FindIdentifier(Ident); NewItem := CurrentIdentifierList.FindIdentifier(Ident);
if Assigned(NewItem) then if (NewItem<>nil) and (NewItem.Tool<>nil) then begin
begin
if (Lvl > NewItem.Level + 1) if (Lvl > NewItem.Level + 1)
or (Lvl <> NewItem.Level) and not NewItem.Tool.ProcNodeHasSpecifier(NewItem.Node, psOVERLOAD) or ((Lvl <> NewItem.Level) and not NewItem.Tool.ProcNodeHasSpecifier(NewItem.Node, psOVERLOAD))
then Ident := nil; // there is previous declaration whitout 'overload' then Ident := nil; // there is a previous declaration without 'overload'
end; end;
end; end;