]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/algorithms.cc
* merged from main
[apt.git] / apt-pkg / algorithms.cc
index eb59a42ca973b2202f1e09ef670574ed4f9911b9..bd814729155e6380a2b61f70bb37a6b3316cb456 100644 (file)
@@ -512,7 +512,7 @@ void pkgProblemResolver::MakeScores()
          on the same level. We enhance the score of installed packages 
         if those are not obsolete
       */
-      if (I->CurrentVer != 0 && Cache[I].CandidateVerIter(Cache).Downloadable())
+      if (I->CurrentVer != 0 && Cache[I].CandidateVer != 0 && Cache[I].CandidateVerIter(Cache).Downloadable())
         Score += 1;
    }