X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/9919af907aef04caa4061e411259525e46eb49e2..5b7d1ee67575e311871fb73be421ea7fd2f6fd73:/apt-pkg/policy.cc diff --git a/apt-pkg/policy.cc b/apt-pkg/policy.cc index 2cc2e5e39..291d83c67 100644 --- a/apt-pkg/policy.cc +++ b/apt-pkg/policy.cc @@ -231,6 +231,9 @@ void pkgPolicy::CreatePin(pkgVersionMatch::MatchType Type,string Name, // Get a spot to put the pin pkgCache::GrpIterator Grp = Cache->FindGrp(Name); + if (Grp.end() == true) + return; + for (pkgCache::PkgIterator Pkg = Grp.PackageList(); Pkg.end() != true; Pkg = Grp.NextPkg(Pkg)) {