]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/pkgrecords.cc
* merged changes from Kamions upload (thanks!)
[apt.git] / apt-pkg / pkgrecords.cc
index 1d71d3e2fb67af1085ea441ae64e2d75d8d3d39a..9c2655d6a774a3b452707f2f5958ec972fc3d7ed 100644 (file)
@@ -42,9 +42,6 @@ pkgRecords::pkgRecords(pkgCache &Cache) : Cache(Cache), Files(0)
       if (Files[I->ID] == 0)
         return;
    }   
       if (Files[I->ID] == 0)
         return;
    }   
-   // We store that to make sure that the destructor won't segfault,
-   // even if the Cache object was destructed before this instance.
-   PackageFileCount = Cache.HeaderP->PackageFileCount;
 }
                                                                        /*}}}*/
 // Records::~pkgRecords - Destructor                                   /*{{{*/
 }
                                                                        /*}}}*/
 // Records::~pkgRecords - Destructor                                   /*{{{*/
@@ -52,7 +49,7 @@ pkgRecords::pkgRecords(pkgCache &Cache) : Cache(Cache), Files(0)
 /* */
 pkgRecords::~pkgRecords()
 {
 /* */
 pkgRecords::~pkgRecords()
 {
-   for (unsigned I = 0; I != PackageFileCount; I++)
+   for (unsigned I = 0; I != Cache.HeaderP->PackageFileCount; I++)
       delete Files[I];
    delete [] Files;
 }
       delete Files[I];
    delete [] Files;
 }