Browse Source

* added a fix for crashes on very short fpdoc projects. x.y.z.count was examined without checking x,y and z existed.

Fixes Mantis #24579

git-svn-id: trunk@24943 -
marco 12 years ago
parent
commit
72b0e72580
1 changed files with 4 additions and 2 deletions
  1. 4 2
      utils/fpdoc/dw_html.pp

+ 4 - 2
utils/fpdoc/dw_html.pp

@@ -539,8 +539,10 @@ constructor THTMLWriter.Create(APackage: TPasPackage; AEngine: TFPDocEngine);
   Function HaveClasses(AModule: TPasModule) : Boolean;
 
   begin
-    with AModule do
-      Result:=InterfaceSection.Classes.Count>0;
+    result:=assigned(AModule)
+           and assigned(AModule.InterfaceSection)
+           and assigned(AModule.InterfaceSection.Classes)
+           and (AModule.InterfaceSection.Classes.Count>0);
   end;
 
   procedure ScanModule(AModule: TPasModule; LinkList : TObjectList);