]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/policy.cc
add options to disable specific checksums for Indexes
[apt.git] / apt-pkg / policy.cc
index f05b6ca49b172f77eaaea684dc9f04a913f5d502..5427271b6108b5e67a808fbd458691e26dc88889 100644 (file)
@@ -45,6 +45,8 @@ using namespace std;
    file matches the V0 policy engine. */
 pkgPolicy::pkgPolicy(pkgCache *Owner) : Pins(0), PFPriority(0), Cache(Owner)
 {
+   if (Owner == 0 || &(Owner->Head()) == 0)
+      return;
    PFPriority = new signed short[Owner->Head().PackageFileCount];
    Pins = new Pin[Owner->Head().PackageCount];