mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 00:29:33 +02:00
* makeskel in update mode can crash when looking for elements. Fixed this
git-svn-id: trunk@9592 -
This commit is contained in:
parent
c22909a1f8
commit
e54422ce7a
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user