Forráskód Böngészése

* Fixed access violation

git-svn-id: trunk@10644 -
michael 17 éve
szülő
commit
d8fdb83aa2
1 módosított fájl, 3 hozzáadás és 2 törlés
  1. 3 2
      rtl/objpas/classes/writer.inc

+ 3 - 2
rtl/objpas/classes/writer.inc

@@ -608,8 +608,9 @@ begin
     try
       Component.GetChildren(@WriteComponent, FRoot);
     Finally
-      For I:=0 to FAncestors.Count-1 do 
-        FAncestors.Objects[i].Free;
+      If Assigned(Fancestors) then
+        For I:=0 to FAncestors.Count-1 do 
+          FAncestors.Objects[i].Free;
       FreeAndNil(FAncestors);
     end;    
   finally