From 9f6417e73c17b4f71dcdcec8888a4b5217865f20 Mon Sep 17 00:00:00 2001 From: mattias Date: Mon, 4 May 2009 11:47:10 +0000 Subject: [PATCH] codetools: fixed identifier completion in top level node git-svn-id: trunk@19797 - --- components/codetools/identcompletiontool.pas | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/codetools/identcompletiontool.pas b/components/codetools/identcompletiontool.pas index 1e04e4e92f..c3513211a8 100644 --- a/components/codetools/identcompletiontool.pas +++ b/components/codetools/identcompletiontool.pas @@ -1410,7 +1410,9 @@ begin GatherContext.Node:=GatherContext.Node.Parent; end else if (GatherContext.Node.Desc=ctnClassInheritance) - or (GatherContext.Node.Parent.Desc=ctnClassInheritance) then begin + or ((GatherContext.Node.Parent<>nil) + and (GatherContext.Node.Parent.Desc=ctnClassInheritance)) + then begin while not (GatherContext.Node.Desc in [ctnClass,ctnClassInterface]) do GatherContext.Node:=GatherContext.Node.Parent; GatherContext.Node:=GatherContext.Node.Parent;