* makeskel in update mode can crash when looking for elements. Fixed this

git-svn-id: trunk@9592 -
This commit is contained in:
michael 2007-12-30 21:17:56 +00:00
parent c22909a1f8
commit e54422ce7a

View File

@ -849,17 +849,23 @@ end;
function TFPDocEngine.FindElement(const AName: String): TPasElement;
function FindInModule(AModule: TPasModule; const LocalName: String): TPasElement;
var
l: TList;
i: Integer;
begin
l := AModule.InterfaceSection.Declarations;
for i := 0 to l.Count - 1 do
begin
Result := TPasElement(l[i]);
if CompareText(Result.Name, LocalName) = 0 then
exit;
end;
If assigned(AModule.InterfaceSection) and
Assigned(AModule.InterfaceSection.Declarations) then
begin
l:=AModule.InterfaceSection.Declarations;
for i := 0 to l.Count - 1 do
begin
Result := TPasElement(l[i]);
if CompareText(Result.Name, LocalName) = 0 then
exit;
end;
end;
Result := nil;
end;