codetools: fixed finding ancestors in non class node

git-svn-id: trunk@19796 -
This commit is contained in:
mattias 2009-05-04 11:45:22 +00:00
parent fd88c3a5bd
commit b41d00e4e3

View File

@ -3541,7 +3541,7 @@ begin
// find class node
ANode:=FindDeepestNodeAtPos(CleanCursorPos,true);
if (ANode.Desc=ctnClassInheritance)
or (ANode.Parent.Desc=ctnClassInheritance) then
or ((ANode.Parent<>nil) and (ANode.Parent.Desc=ctnClassInheritance)) then
exit;
ClassNode:=FindClassNode(ANode);
if (ClassNode=nil) or (ClassNode.Parent=nil)