소스 검색

* small fix for last commit that avoids trouble when project is created programmatically

git-svn-id: trunk@14498 -
marco 15 년 전
부모
커밋
c8f3925944
1개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. 5 2
      packages/chm/src/chmfilewriter.pas

+ 5 - 2
packages/chm/src/chmfilewriter.pas

@@ -212,8 +212,11 @@ begin
   begin
     nd:=TChmContextNode(files.objects[i]);
     Cfg.SetValue('Files/FileName'+IntToStr(I)+'/Value', Files.Strings[I]);
-    Cfg.SetValue('Files/FileName'+IntToStr(I)+'/ContextNumber', nd.contextnumber);
-    Cfg.SetValue('Files/FileName'+IntToStr(I)+'/ContextName', nd.contextname);
+    if assigned(nd) then
+      begin
+        Cfg.SetValue('Files/FileName'+IntToStr(I)+'/ContextNumber', nd.contextnumber);
+        Cfg.SetValue('Files/FileName'+IntToStr(I)+'/ContextName', nd.contextname);
+      end;  
   end;
   Cfg.SetValue('Files/IndexFile/Value', IndexFileName);
   Cfg.SetValue('Files/TOCFile/Value', TableOfContentsFileName);