IDE: fixed crash in completion box if type has no node

git-svn-id: trunk@24785 -
This commit is contained in:
mattias 2010-04-21 10:53:45 +00:00
parent 4ebeff5456
commit d9939ecbe6

View File

@ -363,31 +363,34 @@ begin
begin
ANode:=IdentItem.Tool.FindTypeNodeOfDefinition(ItemNode);
s:=' = ';
case ANode.Desc of
ctnClass,ctnObject,ctnObjCClass,ctnObjCCategory,
ctnCPPClass,
ctnClassInterface,ctnObjCProtocol,ctnDispinterface:
begin
case ANode.Desc of
ctnClass: s:=s+'class';
ctnObject: s:=s+'object';
ctnObjCClass: s:=s+'objcclass';
ctnObjCCategory: s:=s+'objccategory';
ctnCPPClass: s:=s+'cppclass';
ctnClassInterface: s:=s+'interface';
ctnObjCProtocol: s:=s+'objcprotocol';
ctnDispinterface: s:=s+'dispinterface';
if (ANode<>nil) then begin
case ANode.Desc of
ctnClass,ctnObject,ctnObjCClass,ctnObjCCategory,
ctnCPPClass,
ctnClassInterface,ctnObjCProtocol,ctnDispinterface:
begin
case ANode.Desc of
ctnClass: s:=s+'class';
ctnObject: s:=s+'object';
ctnObjCClass: s:=s+'objcclass';
ctnObjCCategory: s:=s+'objccategory';
ctnCPPClass: s:=s+'cppclass';
ctnClassInterface: s:=s+'interface';
ctnObjCProtocol: s:=s+'objcprotocol';
ctnDispinterface: s:=s+'dispinterface';
end;
IdentItem.Tool.BuildSubTree(ANode);
SubNode:=IdentItem.Tool.FindInheritanceNode(ANode);
if SubNode<>nil then
s:=s+IdentItem.Tool.ExtractNode(SubNode,[]);
end;
IdentItem.Tool.BuildSubTree(ANode);
SubNode:=IdentItem.Tool.FindInheritanceNode(ANode);
if SubNode<>nil then
s:=s+IdentItem.Tool.ExtractNode(SubNode,[]);
ctnRecordType:
s:=s+'record';
else
s:=s+IdentItem.Tool.ExtractNode(ANode,[]);
end;
ctnRecordType:
s:=s+'record';
else
s:=s+IdentItem.Tool.ExtractNode(ANode,[]);
end;
end else
s:=s+'?';
end;
ctnConstDefinition: