codetools: fixed crash in TCodeCompletionCodeTool.AddProcedureCompatibleToProcType, bug #21271

git-svn-id: trunk@35951 -
This commit is contained in:
mattias 2012-03-13 23:01:54 +00:00
parent 3565bdf474
commit 065b887ee3

View File

@ -1261,8 +1261,8 @@ begin
end;
if InFrontOfNode<>nil then begin
// insert in front
Indent:=GetLineIndent(Src,Node.StartPos);
InsertPos:=FindLineEndOrCodeInFrontOfPosition(Node.StartPos);
Indent:=GetLineIndent(Src,InFrontOfNode.StartPos);
InsertPos:=FindLineEndOrCodeInFrontOfPosition(InFrontOfNode.StartPos);
end else begin
Node:=FindMainUsesSection(false);
if Node<>nil then begin