From b41d00e4e3745be8f3ec4f04fd4c5e9da99bcb90 Mon Sep 17 00:00:00 2001 From: mattias Date: Mon, 4 May 2009 11:45:22 +0000 Subject: [PATCH] codetools: fixed finding ancestors in non class node git-svn-id: trunk@19796 - --- components/codetools/finddeclarationtool.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/codetools/finddeclarationtool.pas b/components/codetools/finddeclarationtool.pas index 2550db613b..8a3bd3ba16 100644 --- a/components/codetools/finddeclarationtool.pas +++ b/components/codetools/finddeclarationtool.pas @@ -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)