codetools: fixed AV when searching the ancestor of an empty class declaration

git-svn-id: trunk@13487 -
This commit is contained in:
mattias 2007-12-27 18:31:26 +00:00
parent 612dfc2e29
commit f8a6cc5969
2 changed files with 7 additions and 5 deletions

View File

@ -1202,7 +1202,9 @@ var CleanCursorPos: integer;
BuildSubTreeForClass(ClassNode);
CursorNode:=FindDeepestNodeAtPos(ClassNode,CleanCursorPos,true);
if (CursorNode.Desc in [ctnClass,ctnClassInterface])
and (CleanCursorPos<ClassNode.FirstChild.StartPos) then begin
and ((ClassNode.FirstChild=nil)
or (CleanCursorPos<ClassNode.FirstChild.StartPos))
then begin
// identifier is an ancestor/interface identifier
CursorNode:=CursorNode.Parent;
DirectSearch:=true;

View File

@ -4,11 +4,11 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: iputils:slongversion
msgid "Version %.2f"
msgstr ""
#: iputils:sshortversion
msgid "v%.2f"
msgstr ""
#: iputils:slongversion
msgid "Version %.2f"
msgstr ""