]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/depcache.cc
* merged from the install-recommends branch
[apt.git] / apt-pkg / depcache.cc
index abe2842ccef375868c4604ff7acf5bb1141ba0a7..78c929d6203051fc5cebc63a38481bfdd0c4e46a 100644 (file)
@@ -863,14 +863,15 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst,
       {
         bool found=false;
         VerIterator instVer = Pkg.CurrentVer();
-        for (DepIterator D = instVer.DependsList(); D.end() != true; D++)
-        {
-           //FIXME: deal better with or-groups(?)
-           DepIterator LocalStart = D;
-           
-           if(IsImportantDep(D) && Start.TargetPkg() == D.TargetPkg())
-              found=true;
-        }
+        if(!instVer.end())
+           for (DepIterator D = instVer.DependsList(); D.end() != true; D++)
+           {
+              //FIXME: deal better with or-groups(?)
+              DepIterator LocalStart = D;
+              
+              if(IsImportantDep(D) && Start.TargetPkg() == D.TargetPkg())
+                 found=true;
+           }
         // this is a new dep if it was not found to be already
         // a important dep of the installed pacakge
         isNewImportantDep = !found;