Explorar o código

* apt-pkg/depcache.cc:
- only work on instVer if we actually have one

Michael Vogt %!s(int64=20) %!d(string=hai) anos
pai
achega
6ea0868057
Modificáronse 1 ficheiros con 9 adicións e 8 borrados
  1. 9 8
      apt-pkg/depcache.cc

+ 9 - 8
apt-pkg/depcache.cc

@@ -680,14 +680,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;