summaryrefslogtreecommitdiff
path: root/cmdline/apt-get.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2005-10-24 08:28:53 +0000
committerMichael Vogt <michael.vogt@ubuntu.com>2005-10-24 08:28:53 +0000
commitd5f38102698899c4d3693583247a71f54ea1b278 (patch)
treef22ac17dc33bb68eee633e84cf600d0b89ccd1c9 /cmdline/apt-get.cc
parent7e62a09f362dc7573e2845c3b317fd6b2a2aa58c (diff)
* cmdline/apt-get.cc: fix bug in FindSrc() (debian #335213)
Diffstat (limited to 'cmdline/apt-get.cc')
-rw-r--r--cmdline/apt-get.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index 040f670b1..48b21a31f 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -1200,7 +1200,7 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
VerTag = string(TmpSrc.begin() + Slash + 1,TmpSrc.end());
TmpSrc = string(TmpSrc.begin(),TmpSrc.begin() + Slash);
}
- else if(DefRel.empty() == false)
+ else if(!Pkg.end() && DefRel.empty() == false)
{
// we have a default release, try to locate the pkg. we do it like
// this because GetCandidateVer() will not "downgrade", that means
@@ -1211,10 +1211,6 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
for (pkgCache::VerFileIterator VF = Ver.FileList(); VF.end() == false;
VF++)
{
- // extra paranioa
- if(VF.File() == NULL)
- continue;
-
/* If this is the status file, and the current version is not the
version in the status file (ie it is not installed, or somesuch)
then it is not a candidate for installation, ever. This weeds