summaryrefslogtreecommitdiff
path: root/apt-pkg/algorithms.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/algorithms.cc')
-rw-r--r--apt-pkg/algorithms.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc
index e1b9406e2..5fa16e66f 100644
--- a/apt-pkg/algorithms.cc
+++ b/apt-pkg/algorithms.cc
@@ -497,7 +497,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;
}