]> git.saurik.com Git - apt.git/commitdiff
* apt-pkg/depcache.cc:
authorMichael Vogt <michael.vogt@ubuntu.com>
Fri, 11 Aug 2006 15:27:13 +0000 (17:27 +0200)
committerMichael Vogt <michael.vogt@ubuntu.com>
Fri, 11 Aug 2006 15:27:13 +0000 (17:27 +0200)
  - only work on instVer if we actually have one

apt-pkg/depcache.cc

index bfcb8e0eb8c5e828a3df94d873f228eacb7f6acd..b5b96dbcf3c5bd23932388d8ca6e639a717333e6 100644 (file)
@@ -680,14 +680,15 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst,
       {
         bool found=false;
         VerIterator instVer = Pkg.CurrentVer();
       {
         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;
         // this is a new dep if it was not found to be already
         // a important dep of the installed pacakge
         isNewImportantDep = !found;