Browse Source

--- Merging r24943 into '.':
U utils/fpdoc/dw_html.pp

# revisions: 24943
r24943 | marco | 2013-06-23 11:10:15 +0200 (Sun, 23 Jun 2013) | 3 lines
Changed paths:
M /trunk/utils/fpdoc/dw_html.pp

* 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: branches/fixes_2_6@25206 -

marco 12 years ago
parent
commit
8c9fd44612
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);