X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/f688d1d3c90091c308ec979eabab511134810be9..3c54407f8783d5e27363eabf41dbc3d031526ffe:/apt-pkg/policy.cc diff --git a/apt-pkg/policy.cc b/apt-pkg/policy.cc index f05b6ca49..5427271b6 100644 --- a/apt-pkg/policy.cc +++ b/apt-pkg/policy.cc @@ -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];